# unified-gateway **Repository Path**: gray9420/unified-gateway ## Basic Information - **Project Name**: unified-gateway - **Description**: model调用路由中枢,支持流式和阻塞式返回 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2026-01-27 - **Last Updated**: 2026-02-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # unified-gateway Spring Boot 3.x + JDK 17 的统一模型调用中枢服务(阻塞 + SSE)。 ## 本地运行 ```bash ./mvnw.cmd spring-boot:run ``` ## Swagger / OpenAPI - OpenAPI JSON:`http://localhost:8080/v3/api-docs` - Knife4j UI:`http://localhost:8080/doc.html` ## 统一接口 - `POST /invoke`:同一个接口,根据 `stream=true` 自动返回 JSON 或 SSE。 ### 阻塞调用示例 ```bash curl -s http://localhost:8080/invoke \ -H "Content-Type: application/json" \ -d '{ "requestId": "demo-1", "text": "你好,简单自我介绍一下" }' ``` ### SSE 调用示例 ```bash curl -N http://localhost:8080/invoke \ -H "Content-Type: application/json" \ -d '{ "requestId": "demo-2", "stream": true, "text": "请描述这张图片", "image": {"url": "https://example.com/a.png"} }' ``` ## 路由规则 - 仅图片/图片+文本:路由到 `QWEN_VL` - 图片 + `robotPose`:路由到 `EMBODIED_EXECUTION` ## 配置 见 `src/main/resources/application.yml` 的 `model-gateway.*`。