Skip to content

Commit

Permalink
Merge pull request #923 from bjwswang/main
Browse files Browse the repository at this point in the history
chore: add new param namespace in chat apis
  • Loading branch information
bjwswang authored Mar 25, 2024
2 parents 00dd4b9 + c4f0e56 commit 65aeaff
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 105 deletions.
67 changes: 41 additions & 26 deletions apiserver/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,13 @@ const docTemplate = `{
],
"summary": "chat with application",
"parameters": [
{
"type": "string",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
"type": "boolean",
"description": "Should the chat request be treated as debugging?",
Expand Down Expand Up @@ -881,6 +888,13 @@ const docTemplate = `{
],
"summary": "list all conversations",
"parameters": [
{
"type": "string",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
"description": "query params, if not set will return all current user's conversations",
"name": "request",
Expand Down Expand Up @@ -975,9 +989,9 @@ const docTemplate = `{
"parameters": [
{
"type": "string",
"description": "The app namespace for this conversation",
"name": "app_namespace",
"in": "formData",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
Expand Down Expand Up @@ -1037,6 +1051,13 @@ const docTemplate = `{
],
"summary": "get all messages history for one conversation",
"parameters": [
{
"type": "string",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
"description": "query params",
"name": "request",
Expand Down Expand Up @@ -1083,6 +1104,13 @@ const docTemplate = `{
],
"summary": "get one message references",
"parameters": [
{
"type": "string",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
"type": "string",
"description": "messageID",
Expand Down Expand Up @@ -1139,6 +1167,13 @@ const docTemplate = `{
],
"summary": "get app's prompt starters",
"parameters": [
{
"type": "string",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
"type": "integer",
"description": "how many prompts you need should \u003e 0 and \u003c 10",
Expand Down Expand Up @@ -1203,7 +1238,7 @@ const docTemplate = `{
},
{
"type": "string",
"description": "Name of the bucket",
"description": "Name of the rag",
"name": "namespace",
"in": "header",
"required": true
Expand Down Expand Up @@ -1284,7 +1319,7 @@ const docTemplate = `{
},
{
"type": "string",
"description": "Name of the bucket",
"description": "Name of the rag",
"name": "namespace",
"in": "header",
"required": true
Expand Down Expand Up @@ -1341,7 +1376,7 @@ const docTemplate = `{
},
{
"type": "string",
"description": "Name of the bucket",
"description": "Name of the rag",
"name": "namespace",
"in": "header",
"required": true
Expand Down Expand Up @@ -1387,11 +1422,6 @@ const docTemplate = `{
"description": "AppName, the name of the application",
"type": "string",
"example": "chat-with-llm"
},
"app_namespace": {
"description": "AppNamespace, the namespace of the application, will be forced to use the value of the namespace in the request header for security reasons and is placed here only for compatibility with older versions",
"type": "string",
"example": "kubeagi-system"
}
}
},
Expand All @@ -1408,11 +1438,6 @@ const docTemplate = `{
"type": "string",
"example": "chat-with-llm"
},
"app_namespace": {
"description": "AppNamespace, the namespace of the application, will be forced to use the value of the namespace in the request header for security reasons and is placed here only for compatibility with older versions",
"type": "string",
"example": "kubeagi-system"
},
"conversation_id": {
"description": "ConversationID, if it is empty, a new conversation will be created",
"type": "string",
Expand Down Expand Up @@ -1504,11 +1529,6 @@ const docTemplate = `{
"type": "string",
"example": "chat-with-llm"
},
"app_namespace": {
"description": "AppNamespace, the namespace of the application, will be forced to use the value of the namespace in the request header for security reasons and is placed here only for compatibility with older versions",
"type": "string",
"example": "kubeagi-system"
},
"conversation_id": {
"description": "ConversationID, if it is empty, a new conversation will be created",
"type": "string",
Expand Down Expand Up @@ -1553,11 +1573,6 @@ const docTemplate = `{
"type": "string",
"example": "chat-with-llm"
},
"app_namespace": {
"description": "AppNamespace, the namespace of the application, will be forced to use the value of the namespace in the request header for security reasons and is placed here only for compatibility with older versions",
"type": "string",
"example": "kubeagi-system"
},
"conversation_id": {
"description": "ConversationID, if it is empty, a new conversation will be created",
"type": "string",
Expand Down
67 changes: 41 additions & 26 deletions apiserver/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,13 @@
],
"summary": "chat with application",
"parameters": [
{
"type": "string",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
"type": "boolean",
"description": "Should the chat request be treated as debugging?",
Expand Down Expand Up @@ -875,6 +882,13 @@
],
"summary": "list all conversations",
"parameters": [
{
"type": "string",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
"description": "query params, if not set will return all current user's conversations",
"name": "request",
Expand Down Expand Up @@ -969,9 +983,9 @@
"parameters": [
{
"type": "string",
"description": "The app namespace for this conversation",
"name": "app_namespace",
"in": "formData",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
Expand Down Expand Up @@ -1031,6 +1045,13 @@
],
"summary": "get all messages history for one conversation",
"parameters": [
{
"type": "string",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
"description": "query params",
"name": "request",
Expand Down Expand Up @@ -1077,6 +1098,13 @@
],
"summary": "get one message references",
"parameters": [
{
"type": "string",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
"type": "string",
"description": "messageID",
Expand Down Expand Up @@ -1133,6 +1161,13 @@
],
"summary": "get app's prompt starters",
"parameters": [
{
"type": "string",
"description": "namespace this request is in",
"name": "namespace",
"in": "header",
"required": true
},
{
"type": "integer",
"description": "how many prompts you need should \u003e 0 and \u003c 10",
Expand Down Expand Up @@ -1197,7 +1232,7 @@
},
{
"type": "string",
"description": "Name of the bucket",
"description": "Name of the rag",
"name": "namespace",
"in": "header",
"required": true
Expand Down Expand Up @@ -1278,7 +1313,7 @@
},
{
"type": "string",
"description": "Name of the bucket",
"description": "Name of the rag",
"name": "namespace",
"in": "header",
"required": true
Expand Down Expand Up @@ -1335,7 +1370,7 @@
},
{
"type": "string",
"description": "Name of the bucket",
"description": "Name of the rag",
"name": "namespace",
"in": "header",
"required": true
Expand Down Expand Up @@ -1381,11 +1416,6 @@
"description": "AppName, the name of the application",
"type": "string",
"example": "chat-with-llm"
},
"app_namespace": {
"description": "AppNamespace, the namespace of the application, will be forced to use the value of the namespace in the request header for security reasons and is placed here only for compatibility with older versions",
"type": "string",
"example": "kubeagi-system"
}
}
},
Expand All @@ -1402,11 +1432,6 @@
"type": "string",
"example": "chat-with-llm"
},
"app_namespace": {
"description": "AppNamespace, the namespace of the application, will be forced to use the value of the namespace in the request header for security reasons and is placed here only for compatibility with older versions",
"type": "string",
"example": "kubeagi-system"
},
"conversation_id": {
"description": "ConversationID, if it is empty, a new conversation will be created",
"type": "string",
Expand Down Expand Up @@ -1498,11 +1523,6 @@
"type": "string",
"example": "chat-with-llm"
},
"app_namespace": {
"description": "AppNamespace, the namespace of the application, will be forced to use the value of the namespace in the request header for security reasons and is placed here only for compatibility with older versions",
"type": "string",
"example": "kubeagi-system"
},
"conversation_id": {
"description": "ConversationID, if it is empty, a new conversation will be created",
"type": "string",
Expand Down Expand Up @@ -1547,11 +1567,6 @@
"type": "string",
"example": "chat-with-llm"
},
"app_namespace": {
"description": "AppNamespace, the namespace of the application, will be forced to use the value of the namespace in the request header for security reasons and is placed here only for compatibility with older versions",
"type": "string",
"example": "kubeagi-system"
},
"conversation_id": {
"description": "ConversationID, if it is empty, a new conversation will be created",
"type": "string",
Expand Down
Loading

0 comments on commit 65aeaff

Please sign in to comment.