// Package docs GENERATED BY SWAG; DO NOT EDIT package docs import "github.com/swaggo/swag" const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", "termsOfService": "http://swagger.io/terms/", "contact": { "name": "API Support", "url": "http://www.swagger.io/support", "email": "support@swagger.io" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/api/v1/chat": { "post": { "description": "发送消息给AI助手,支持工具调用", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "chat" ], "summary": "智能聊天", "parameters": [ { "description": "聊天请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.ChatRequest" } } ], "responses": { "200": { "description": "聊天响应", "schema": { "$ref": "#/definitions/handlers.ChatResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "服务器错误", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/health": { "get": { "description": "检查服务是否正常运行", "produces": [ "application/json" ], "tags": [ "system" ], "summary": "健康检查", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } } }, "definitions": { "handlers.ChatRequest": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string", "example": "北京今天天气怎么样?" }, "model": { "type": "string", "example": "llama2" } } }, "handlers.ChatResponse": { "type": "object", "properties": { "finished": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "北京今天天气晴朗,温度15.3°C" }, "tool_calls": { "type": "array", "items": { "$ref": "#/definitions/handlers.ToolCallResponse" } } } }, "handlers.ErrorResponse": { "type": "object", "properties": { "code": { "type": "integer", "example": 400 }, "error": { "type": "string", "example": "Invalid request" }, "message": { "type": "string", "example": "请求参数错误" } } }, "handlers.FunctionCallResponse": { "type": "object", "properties": { "arguments": {}, "name": { "type": "string", "example": "get_weather" } } }, "handlers.ToolCallResponse": { "type": "object", "properties": { "function": { "$ref": "#/definitions/handlers.FunctionCallResponse" }, "id": { "type": "string", "example": "call_1" }, "result": {}, "type": { "type": "string", "example": "function" } } } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0", Host: "localhost:8080", BasePath: "/", Schemes: []string{}, Title: "AI Scheduler API", Description: "智能路由调度系统API文档", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }