# Generated with protoc-gen-openapi # https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi openapi: 3.0.3 info: title: "" version: 0.0.1 paths: /api/chat: post: tags: - CustomerService description: 聊天消息处理接口 operationId: CustomerService_Chat requestBody: content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.ChatRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.ChatResponse' /api/chat/stream: post: tags: - CustomerService description: 流式聊天接口 (通过HTTP SSE实现) operationId: CustomerService_StreamChat requestBody: content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.StreamChatRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.StreamChatResponse' /api/knowledge/list: get: tags: - CustomerService description: 获取知识库文档列表接口 operationId: CustomerService_ListKnowledge responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.ListKnowledgeResponse' /api/knowledge/search: post: tags: - CustomerService description: 搜索知识库接口 operationId: CustomerService_SearchKnowledge requestBody: content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.SearchKnowledgeRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.SearchKnowledgeResponse' /api/knowledge/summary: post: tags: - CustomerService description: 获取知识库摘要接口 operationId: CustomerService_GetKnowledgeSummary requestBody: content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.GetKnowledgeSummaryRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.GetKnowledgeSummaryResponse' /api/knowledge/upload: post: tags: - CustomerService description: 知识库文档上传接口 operationId: CustomerService_UploadKnowledge requestBody: content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.UploadKnowledgeRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.UploadKnowledgeResponse' /api/knowledge/{id}: delete: tags: - CustomerService description: 删除知识库文档接口 operationId: CustomerService_DeleteKnowledge parameters: - name: id in: path description: 文档ID required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.DeleteKnowledgeResponse' /api/order/query: post: tags: - CustomerService description: 订单查询接口 operationId: CustomerService_QueryOrder requestBody: content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.QueryOrderRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.QueryOrderResponse' /api/sessions: get: tags: - CustomerService description: 获取会话列表接口 operationId: CustomerService_GetSessions responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.GetSessionsResponse' post: tags: - CustomerService description: 创建新会话接口 operationId: CustomerService_CreateSession requestBody: content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.CreateSessionRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.CreateSessionResponse' /api/system/status: get: tags: - CustomerService description: 健康检查接口 operationId: CustomerService_SystemStatus responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.customer.v1.SystemStatusResponse' /helloworld/{name}: get: tags: - Greeter description: Sends a greeting operationId: Greeter_SayHello parameters: - name: name in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/helloworld.v1.HelloReply' components: schemas: api.customer.v1.ChatContent: type: object properties: chunk: type: string description: 消息块 fullMessage: type: string description: 完整消息 isFinal: type: boolean description: 是否为最终消息 description: 聊天内容 api.customer.v1.ChatPayload: type: object properties: dataType: type: string description: 数据类型 content: allOf: - $ref: '#/components/schemas/api.customer.v1.ChatContent' description: 内容 description: 聊天消息内容 api.customer.v1.ChatRequest: type: object properties: message: type: string description: 用户输入消息 sessionId: type: string description: 会话ID description: 聊天请求 api.customer.v1.ChatResponse: type: object properties: sessionId: type: string description: 会话ID timestamp: type: string description: 时间戳 type: type: string description: 消息类型 payload: allOf: - $ref: '#/components/schemas/api.customer.v1.ChatPayload' description: 消息内容 description: 聊天响应 api.customer.v1.CreateSessionRequest: type: object properties: title: type: string description: 会话标题 description: 创建会话请求 api.customer.v1.CreateSessionResponse: type: object properties: sessionId: type: string description: 会话ID title: type: string description: 会话标题 createdAt: type: string description: 创建时间 description: 创建会话响应 api.customer.v1.DeleteKnowledgeResponse: type: object properties: success: type: boolean description: 是否成功 description: 删除知识库文档响应 api.customer.v1.GetKnowledgeSummaryRequest: type: object properties: category: type: string description: 分类 description: 获取知识库摘要请求 api.customer.v1.GetKnowledgeSummaryResponse: type: object properties: category: type: string description: 分类 summary: type: string description: 摘要内容 documentCount: type: integer description: 文档数量 format: int32 lastUpdated: type: string description: 最后更新时间 description: 获取知识库摘要响应 api.customer.v1.GetSessionsResponse: type: object properties: sessions: type: array items: $ref: '#/components/schemas/api.customer.v1.Session' description: 会话列表 description: 获取会话列表响应 api.customer.v1.KnowledgeDocument: type: object properties: id: type: string description: 文档ID fileName: type: string description: 文件名 fileType: type: string description: 文件类型 contentPreview: type: string description: 内容预览 uploadTime: type: string description: 上传时间 status: type: string description: 状态 description: 知识库文档 api.customer.v1.KnowledgeSearchResult: type: object properties: id: type: string description: 文档ID title: type: string description: 标题 content: type: string description: 内容 score: type: number description: 相关性评分 format: float metadata: type: object additionalProperties: type: string description: 元数据 description: 知识库搜索结果 api.customer.v1.ListKnowledgeResponse: type: object properties: documents: type: array items: $ref: '#/components/schemas/api.customer.v1.KnowledgeDocument' description: 文档列表 description: 获取知识库文档列表响应 api.customer.v1.OrderDetails: type: object properties: product: type: string description: 产品名称 amount: type: number description: 金额 format: double createTime: type: string description: 创建时间 description: 订单详情 api.customer.v1.QueryOrderRequest: type: object properties: orderId: type: string description: 订单ID description: 订单查询请求 api.customer.v1.QueryOrderResponse: type: object properties: orderId: type: string description: 订单ID status: type: string description: 订单状态 needAi: type: boolean description: 是否需要AI诊断 details: allOf: - $ref: '#/components/schemas/api.customer.v1.OrderDetails' description: 订单详情 description: 订单查询响应 api.customer.v1.SearchKnowledgeRequest: type: object properties: query: type: string description: 搜索查询 limit: type: integer description: 返回结果数量限制 format: int32 description: 搜索知识库请求 api.customer.v1.SearchKnowledgeResponse: type: object properties: results: type: array items: $ref: '#/components/schemas/api.customer.v1.KnowledgeSearchResult' description: 搜索结果 total: type: integer description: 总数 format: int32 description: 搜索知识库响应 api.customer.v1.ServiceStatus: type: object properties: name: type: string description: 服务名称 status: type: boolean description: 服务状态 message: type: string description: 状态详情 description: 服务状态 api.customer.v1.Session: type: object properties: sessionId: type: string description: 会话ID title: type: string description: 会话标题 createdAt: type: string description: 创建时间 description: 会话信息 api.customer.v1.StreamChatRequest: type: object properties: message: type: string description: 用户输入消息 sessionId: type: string description: 会话ID model: type: string description: 模型名称 (可选) description: 流式聊天请求 api.customer.v1.StreamChatResponse: type: object properties: sessionId: type: string description: 会话ID timestamp: type: string description: 时间戳 type: type: string description: 消息类型 (chunk, final, error) content: type: string description: 消息内容 isFinal: type: boolean description: 是否为最终消息 error: type: string description: 错误信息 (如果有) description: 流式聊天响应 api.customer.v1.SystemStatusResponse: type: object properties: status: type: boolean description: 系统状态 services: type: object additionalProperties: $ref: '#/components/schemas/api.customer.v1.ServiceStatus' description: 服务状态详情 version: type: string description: 版本信息 description: 系统状态响应 api.customer.v1.UploadKnowledgeRequest: type: object properties: fileName: type: string description: 文件名 fileType: type: string description: 文件类型 content: type: string description: 文件内容 format: bytes description: 上传知识库文档请求 api.customer.v1.UploadKnowledgeResponse: type: object properties: success: type: boolean description: 是否成功 fileId: type: string description: 文件ID description: 上传知识库文档响应 helloworld.v1.HelloReply: type: object properties: message: type: string description: The response message containing the greetings tags: - name: CustomerService description: 智能客服服务定义 - name: Greeter description: The greeting service definition.