Skip to content

Commit

Permalink
chore: swagger syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
0xff-dev committed Apr 25, 2024
1 parent eea4d8d commit 29feff0
Show file tree
Hide file tree
Showing 5 changed files with 556 additions and 82 deletions.
246 changes: 207 additions & 39 deletions apiserver/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -986,33 +986,53 @@ const docTemplate = `{
}
}
},
"/chat/conversations/:conversationID": {
"delete": {
"description": "delete one conversation",
"/chat/conversations/file": {
"post": {
"description": "receive conversational files for one conversation",
"consumes": [
"application/json"
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"application"
],
"summary": "delete one conversation",
"summary": "receive conversational files for one conversation",
"parameters": [
{
"type": "string",
"description": "conversationID",
"name": "conversationID",
"in": "path",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
"type": "string",
"description": "The app name for this conversation",
"name": "app_name",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "The conversation id for this file",
"name": "conversation_id",
"in": "formData"
},
{
"type": "file",
"description": "This is the file for the conversation",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/chat.SimpleResp"
"$ref": "#/definitions/chat.ChatRespBody"
}
},
"400": {
Expand All @@ -1030,53 +1050,33 @@ const docTemplate = `{
}
}
},
"/chat/conversations/file": {
"post": {
"description": "receive conversational files for one conversation",
"/chat/conversations/{conversationID}": {
"delete": {
"description": "delete one conversation",
"consumes": [
"multipart/form-data"
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"application"
],
"summary": "receive conversational files for one conversation",
"summary": "delete one conversation",
"parameters": [
{
"type": "string",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
"type": "string",
"description": "The app name for this conversation",
"name": "app_name",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "The conversation id for this file",
"name": "conversation_id",
"in": "formData"
},
{
"type": "file",
"description": "This is the file for the conversation",
"name": "file",
"in": "formData",
"description": "conversationID",
"name": "conversationID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/chat.ChatRespBody"
"$ref": "#/definitions/chat.SimpleResp"
}
},
"400": {
Expand Down Expand Up @@ -1147,7 +1147,7 @@ const docTemplate = `{
}
}
},
"/chat/messages/:messageID/references": {
"/chat/messages/{messageID}/references": {
"post": {
"description": "get one message's references",
"consumes": [
Expand Down Expand Up @@ -1466,6 +1466,138 @@ const docTemplate = `{
}
}
}
},
"/{repo}/revisions": {
"get": {
"description": "get the revisions of the model",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"forward"
],
"summary": "get the revisions of the model",
"parameters": [
{
"type": "string",
"description": "model ID",
"name": "modelid",
"in": "query",
"required": true
},
{
"type": "string",
"description": "huggingface of modelscope",
"name": "repo",
"in": "path",
"required": true
},
{
"type": "string",
"description": "only for huggingface",
"name": "REPOTOKEN",
"in": "header"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/forwardrepo.Revision"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/{repo}/summary": {
"get": {
"description": "get the summary of the model",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"forward"
],
"summary": "get the summary of the model",
"parameters": [
{
"type": "string",
"description": "model ID",
"name": "modelid",
"in": "query",
"required": true
},
{
"type": "string",
"description": "branch or tag, default is main",
"name": "revision",
"in": "query"
},
{
"type": "string",
"description": "huggingface of modelscope",
"name": "repo",
"in": "path",
"required": true
},
{
"type": "string",
"description": "only for huggingface",
"name": "REPOTOKEN",
"in": "header"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/service.SummaryResp"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -1736,6 +1868,34 @@ const docTemplate = `{
}
}
},
"forwardrepo.BranchTag": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"targetCommit": {
"type": "string"
}
}
},
"forwardrepo.Revision": {
"type": "object",
"properties": {
"branches": {
"type": "array",
"items": {
"$ref": "#/definitions/forwardrepo.BranchTag"
}
},
"tags": {
"type": "array",
"items": {
"$ref": "#/definitions/forwardrepo.BranchTag"
}
}
}
},
"rag.RadarData": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2020,6 +2180,14 @@ const docTemplate = `{
}
}
},
"service.SummaryResp": {
"type": "object",
"properties": {
"summary": {
"type": "string"
}
}
},
"service.WebCrawlerFileBody": {
"type": "object",
"required": [
Expand Down
Loading

0 comments on commit 29feff0

Please sign in to comment.