2023-05-15 08:51:32 +08:00
|
|
|
from flask import Blueprint
|
2025-08-25 09:26:54 +08:00
|
|
|
from flask_restx import Namespace
|
2024-04-18 20:24:05 +08:00
|
|
|
|
2023-05-15 08:51:32 +08:00
|
|
|
from libs.external_api import ExternalApi
|
|
|
|
|
|
2024-08-26 15:29:10 +08:00
|
|
|
bp = Blueprint("service_api", __name__, url_prefix="/v1")
|
2025-08-25 09:26:54 +08:00
|
|
|
|
|
|
|
|
api = ExternalApi(
|
|
|
|
|
bp,
|
|
|
|
|
version="1.0",
|
|
|
|
|
title="Service API",
|
|
|
|
|
description="API for application services",
|
|
|
|
|
doc="/docs", # Enable Swagger UI at /v1/docs
|
|
|
|
|
)
|
|
|
|
|
|
2025-08-25 14:56:20 +08:00
|
|
|
service_api_ns = Namespace("service_api", description="Service operations", path="/")
|
2023-05-15 08:51:32 +08:00
|
|
|
|
2024-01-17 22:39:47 +08:00
|
|
|
from . import index
|
2025-08-07 21:44:29 +08:00
|
|
|
from .app import annotation, app, audio, completion, conversation, file, file_preview, message, site, workflow
|
2025-03-19 17:12:48 +08:00
|
|
|
from .dataset import dataset, document, hit_testing, metadata, segment, upload_file
|
2025-04-07 10:36:58 +08:00
|
|
|
from .workspace import models
|
2025-08-25 09:26:54 +08:00
|
|
|
|
|
|
|
|
api.add_namespace(service_api_ns)
|