Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: chat info store to pg #603

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 56 additions & 56 deletions apiserver/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/chat.Conversation"
"$ref": "#/definitions/storage.Conversation"
}
}
},
Expand Down Expand Up @@ -188,7 +188,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/chat.Conversation"
"$ref": "#/definitions/storage.Conversation"
}
},
"400": {
Expand Down Expand Up @@ -1012,37 +1012,6 @@ const docTemplate = `{
}
}
},
"chat.Conversation": {
"type": "object",
"properties": {
"app_name": {
"type": "string",
"example": "chat-with-llm"
},
"app_namespace": {
"type": "string",
"example": "arcadia"
},
"id": {
"type": "string",
"example": "5a41f3ca-763b-41ec-91c3-4bbbb00736d0"
},
"messages": {
"type": "array",
"items": {
"$ref": "#/definitions/chat.Message"
}
},
"started_at": {
"type": "string",
"example": "2023-12-21T10:21:06.389359092+08:00"
},
"updated_at": {
"type": "string",
"example": "2023-12-22T10:21:06.389359092+08:00"
}
}
},
"chat.ConversationReqBody": {
"type": "object",
"required": [
Expand Down Expand Up @@ -1076,29 +1045,6 @@ const docTemplate = `{
}
}
},
"chat.Message": {
"type": "object",
"properties": {
"answer": {
"type": "string",
"example": "旷工最小计算单位为0.5天。"
},
"id": {
"type": "string",
"example": "4f3546dd-5404-4bf8-a3bc-4fa3f9a7ba24"
},
"query": {
"type": "string",
"example": "旷工最小计算单位为多少天?"
},
"references": {
"type": "array",
"items": {
"$ref": "#/definitions/retriever.Reference"
}
}
}
},
"chat.MessageReqBody": {
"type": "object",
"required": [
Expand Down Expand Up @@ -1351,6 +1297,60 @@ const docTemplate = `{
"type": "string"
}
}
},
"storage.Conversation": {
"type": "object",
"properties": {
"app_name": {
"type": "string",
"example": "chat-with-llm"
},
"app_namespace": {
"type": "string",
"example": "arcadia"
},
"id": {
"type": "string",
"example": "5a41f3ca-763b-41ec-91c3-4bbbb00736d0"
},
"messages": {
"type": "array",
"items": {
"$ref": "#/definitions/storage.Message"
}
},
"started_at": {
"type": "string",
"example": "2023-12-21T10:21:06.389359092+08:00"
},
"updated_at": {
"type": "string",
"example": "2023-12-22T10:21:06.389359092+08:00"
}
}
},
"storage.Message": {
"type": "object",
"properties": {
"answer": {
"type": "string",
"example": "旷工最小计算单位为0.5天。"
},
"id": {
"type": "string",
"example": "4f3546dd-5404-4bf8-a3bc-4fa3f9a7ba24"
},
"query": {
"type": "string",
"example": "旷工最小计算单位为多少天?"
},
"references": {
"type": "array",
"items": {
"$ref": "#/definitions/retriever.Reference"
}
}
}
}
}
}`
Expand Down
112 changes: 56 additions & 56 deletions apiserver/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/chat.Conversation"
"$ref": "#/definitions/storage.Conversation"
}
}
},
Expand Down Expand Up @@ -177,7 +177,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/chat.Conversation"
"$ref": "#/definitions/storage.Conversation"
}
},
"400": {
Expand Down Expand Up @@ -1001,37 +1001,6 @@
}
}
},
"chat.Conversation": {
"type": "object",
"properties": {
"app_name": {
"type": "string",
"example": "chat-with-llm"
},
"app_namespace": {
"type": "string",
"example": "arcadia"
},
"id": {
"type": "string",
"example": "5a41f3ca-763b-41ec-91c3-4bbbb00736d0"
},
"messages": {
"type": "array",
"items": {
"$ref": "#/definitions/chat.Message"
}
},
"started_at": {
"type": "string",
"example": "2023-12-21T10:21:06.389359092+08:00"
},
"updated_at": {
"type": "string",
"example": "2023-12-22T10:21:06.389359092+08:00"
}
}
},
"chat.ConversationReqBody": {
"type": "object",
"required": [
Expand Down Expand Up @@ -1065,29 +1034,6 @@
}
}
},
"chat.Message": {
"type": "object",
"properties": {
"answer": {
"type": "string",
"example": "旷工最小计算单位为0.5天。"
},
"id": {
"type": "string",
"example": "4f3546dd-5404-4bf8-a3bc-4fa3f9a7ba24"
},
"query": {
"type": "string",
"example": "旷工最小计算单位为多少天?"
},
"references": {
"type": "array",
"items": {
"$ref": "#/definitions/retriever.Reference"
}
}
}
},
"chat.MessageReqBody": {
"type": "object",
"required": [
Expand Down Expand Up @@ -1340,6 +1286,60 @@
"type": "string"
}
}
},
"storage.Conversation": {
"type": "object",
"properties": {
"app_name": {
"type": "string",
"example": "chat-with-llm"
},
"app_namespace": {
"type": "string",
"example": "arcadia"
},
"id": {
"type": "string",
"example": "5a41f3ca-763b-41ec-91c3-4bbbb00736d0"
},
"messages": {
"type": "array",
"items": {
"$ref": "#/definitions/storage.Message"
}
},
"started_at": {
"type": "string",
"example": "2023-12-21T10:21:06.389359092+08:00"
},
"updated_at": {
"type": "string",
"example": "2023-12-22T10:21:06.389359092+08:00"
}
}
},
"storage.Message": {
"type": "object",
"properties": {
"answer": {
"type": "string",
"example": "旷工最小计算单位为0.5天。"
},
"id": {
"type": "string",
"example": "4f3546dd-5404-4bf8-a3bc-4fa3f9a7ba24"
},
"query": {
"type": "string",
"example": "旷工最小计算单位为多少天?"
},
"references": {
"type": "array",
"items": {
"$ref": "#/definitions/retriever.Reference"
}
}
}
}
}
}
Loading
Loading