fix:message api doc (#15568)
Co-authored-by: mars <linjx2@by-health.com>
This commit is contained in:
parent
258736f505
commit
1fab02c25a
@ -10,7 +10,7 @@ from controllers.service_api.app.error import NotChatAppError
|
|||||||
from controllers.service_api.wraps import FetchUserArg, WhereisUserArg, validate_app_token
|
from controllers.service_api.wraps import FetchUserArg, WhereisUserArg, validate_app_token
|
||||||
from core.app.entities.app_invoke_entities import InvokeFrom
|
from core.app.entities.app_invoke_entities import InvokeFrom
|
||||||
from fields.conversation_fields import message_file_fields
|
from fields.conversation_fields import message_file_fields
|
||||||
from fields.message_fields import feedback_fields, retriever_resource_fields
|
from fields.message_fields import agent_thought_fields, feedback_fields, retriever_resource_fields
|
||||||
from fields.raws import FilesContainedField
|
from fields.raws import FilesContainedField
|
||||||
from libs.helper import TimestampField, uuid_value
|
from libs.helper import TimestampField, uuid_value
|
||||||
from models.model import App, AppMode, EndUser
|
from models.model import App, AppMode, EndUser
|
||||||
@ -19,20 +19,6 @@ from services.message_service import MessageService
|
|||||||
|
|
||||||
|
|
||||||
class MessageListApi(Resource):
|
class MessageListApi(Resource):
|
||||||
agent_thought_fields = {
|
|
||||||
"id": fields.String,
|
|
||||||
"chain_id": fields.String,
|
|
||||||
"message_id": fields.String,
|
|
||||||
"position": fields.Integer,
|
|
||||||
"thought": fields.String,
|
|
||||||
"tool": fields.String,
|
|
||||||
"tool_labels": fields.Raw,
|
|
||||||
"tool_input": fields.String,
|
|
||||||
"created_at": TimestampField,
|
|
||||||
"observation": fields.String,
|
|
||||||
"message_files": fields.List(fields.Nested(message_file_fields)),
|
|
||||||
}
|
|
||||||
|
|
||||||
message_fields = {
|
message_fields = {
|
||||||
"id": fields.String,
|
"id": fields.String,
|
||||||
"conversation_id": fields.String,
|
"conversation_id": fields.String,
|
||||||
|
@ -641,7 +641,7 @@ Chat applications support session persistence, allowing previous chat history to
|
|||||||
"tool_input": "{\"dalle2\": {\"prompt\": \"cat\"}}",
|
"tool_input": "{\"dalle2\": {\"prompt\": \"cat\"}}",
|
||||||
"created_at": 1705988186,
|
"created_at": 1705988186,
|
||||||
"observation": "image has been created and sent to user already, you should tell user to check it now.",
|
"observation": "image has been created and sent to user already, you should tell user to check it now.",
|
||||||
"message_files": [
|
"files": [
|
||||||
"976990d2-5294-47e6-8f14-7356ba9d2d76"
|
"976990d2-5294-47e6-8f14-7356ba9d2d76"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -655,7 +655,7 @@ Chat applications support session persistence, allowing previous chat history to
|
|||||||
"tool_input": "",
|
"tool_input": "",
|
||||||
"created_at": 1705988199,
|
"created_at": 1705988199,
|
||||||
"observation": "",
|
"observation": "",
|
||||||
"message_files": []
|
"files": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -641,7 +641,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
|
|||||||
"tool_input": "{\"dalle2\": {\"prompt\": \"cat\"}}",
|
"tool_input": "{\"dalle2\": {\"prompt\": \"cat\"}}",
|
||||||
"created_at": 1705988186,
|
"created_at": 1705988186,
|
||||||
"observation": "画像はすでに作成され、ユーザーに送信されました。今すぐユーザーに確認するように伝えてください。",
|
"observation": "画像はすでに作成され、ユーザーに送信されました。今すぐユーザーに確認するように伝えてください。",
|
||||||
"message_files": [
|
"files": [
|
||||||
"976990d2-5294-47e6-8f14-7356ba9d2d76"
|
"976990d2-5294-47e6-8f14-7356ba9d2d76"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -655,7 +655,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
|
|||||||
"tool_input": "",
|
"tool_input": "",
|
||||||
"created_at": 1705988199,
|
"created_at": 1705988199,
|
||||||
"observation": "",
|
"observation": "",
|
||||||
"message_files": []
|
"files": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -657,7 +657,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
|||||||
"tool_input": "{\"dalle2\": {\"prompt\": \"cat\"}}",
|
"tool_input": "{\"dalle2\": {\"prompt\": \"cat\"}}",
|
||||||
"created_at": 1705988186,
|
"created_at": 1705988186,
|
||||||
"observation": "image has been created and sent to user already, you should tell user to check it now.",
|
"observation": "image has been created and sent to user already, you should tell user to check it now.",
|
||||||
"message_files": [
|
"files": [
|
||||||
"976990d2-5294-47e6-8f14-7356ba9d2d76"
|
"976990d2-5294-47e6-8f14-7356ba9d2d76"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -671,7 +671,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
|||||||
"tool_input": "",
|
"tool_input": "",
|
||||||
"created_at": 1705988199,
|
"created_at": 1705988199,
|
||||||
"observation": "",
|
"observation": "",
|
||||||
"message_files": []
|
"files": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user