mirror of
https://github.com/deanxv/coze-discord-proxy.git
synced 2026-06-13 21:01:48 +08:00
532 lines
16 KiB
Go
532 lines
16 KiB
Go
// Package docs Code generated by swaggo/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}}",
|
|
"contact": {},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/api/channel/create": {
|
|
"post": {
|
|
"description": "创建频道",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"channel"
|
|
],
|
|
"summary": "创建频道",
|
|
"parameters": [
|
|
{
|
|
"description": "channelModel",
|
|
"name": "channelModel",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.ChannelReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.ChannelResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/channel/del/{id}": {
|
|
"get": {
|
|
"description": "删除频道",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"channel"
|
|
],
|
|
"summary": "删除频道",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/del/all/cdp": {
|
|
"get": {
|
|
"description": "删除全部CDP临时频道[谨慎调用]",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"channel"
|
|
],
|
|
"summary": "删除全部CDP临时频道[谨慎调用]",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/thread/create": {
|
|
"post": {
|
|
"description": "创建线程",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"thread"
|
|
],
|
|
"summary": "创建线程",
|
|
"parameters": [
|
|
{
|
|
"description": "threadModel",
|
|
"name": "threadModel",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.ThreadReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.ThreadResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/chat/completions": {
|
|
"post": {
|
|
"description": "发送消息-openai",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"openai"
|
|
],
|
|
"summary": "发送消息-openai",
|
|
"parameters": [
|
|
{
|
|
"description": "request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.OpenAIChatCompletionRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Authorization",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "out-time",
|
|
"name": "out-time",
|
|
"in": "header"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.OpenAIChatCompletionResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/images/generations": {
|
|
"post": {
|
|
"description": "图片生成-openai",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"openai"
|
|
],
|
|
"summary": "图片生成-openai",
|
|
"parameters": [
|
|
{
|
|
"description": "request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.OpenAIImagesGenerationRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Authorization",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "out-time",
|
|
"name": "out-time",
|
|
"in": "header"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.OpenAIImagesGenerationResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/models": {
|
|
"get": {
|
|
"description": "模型列表-openai",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"openai"
|
|
],
|
|
"summary": "模型列表-openai",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Authorization",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.OpenaiModelListResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"model.ChannelReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parentId": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"model.ChannelResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.OpenAIChatCompletionRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"channelId": {
|
|
"type": "string"
|
|
},
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.OpenAIChatMessage"
|
|
}
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"stream": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"model.OpenAIChatCompletionResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"choices": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.OpenAIChoice"
|
|
}
|
|
},
|
|
"created": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"object": {
|
|
"type": "string"
|
|
},
|
|
"suggestions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"system_fingerprint": {
|
|
"type": "string"
|
|
},
|
|
"usage": {
|
|
"$ref": "#/definitions/model.OpenAIUsage"
|
|
}
|
|
}
|
|
},
|
|
"model.OpenAIChatMessage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {},
|
|
"role": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.OpenAIChoice": {
|
|
"type": "object",
|
|
"properties": {
|
|
"delta": {
|
|
"$ref": "#/definitions/model.OpenAIDelta"
|
|
},
|
|
"finish_reason": {
|
|
"type": "string"
|
|
},
|
|
"index": {
|
|
"type": "integer"
|
|
},
|
|
"logprobs": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"$ref": "#/definitions/model.OpenAIMessage"
|
|
}
|
|
}
|
|
},
|
|
"model.OpenAIDelta": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.OpenAIImagesGenerationDataResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"b64_json": {
|
|
"type": "string"
|
|
},
|
|
"revised_prompt": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.OpenAIImagesGenerationRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"channelId": {
|
|
"type": "string"
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"prompt": {
|
|
"type": "string"
|
|
},
|
|
"response_format": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.OpenAIImagesGenerationResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created": {
|
|
"type": "integer"
|
|
},
|
|
"dailyLimit": {
|
|
"type": "boolean"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.OpenAIImagesGenerationDataResponse"
|
|
}
|
|
},
|
|
"suggestions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"model.OpenAIMessage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.OpenAIUsage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"completion_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"prompt_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"total_tokens": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.OpenaiModelListResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.OpenaiModelResponse"
|
|
}
|
|
},
|
|
"object": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.OpenaiModelResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"object": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.ThreadReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"archiveDuration": {
|
|
"type": "number"
|
|
},
|
|
"channelId": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.ThreadResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "1.0.0",
|
|
Host: "",
|
|
BasePath: "",
|
|
Schemes: []string{},
|
|
Title: "COZE-DISCORD-PROXY",
|
|
Description: "COZE-DISCORD-PROXY 代理服务",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
LeftDelim: "{{",
|
|
RightDelim: "}}",
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|