fix:message api doc (#15568)

Co-authored-by: mars <linjx2@by-health.com>
This commit is contained in:
Mars 2025-03-12 12:38:23 +08:00 committed by GitHub
parent 258736f505
commit 1fab02c25a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 21 deletions

View File

@ -10,7 +10,7 @@ from controllers.service_api.app.error import NotChatAppError
from controllers.service_api.wraps import FetchUserArg, WhereisUserArg, validate_app_token
from core.app.entities.app_invoke_entities import InvokeFrom
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 libs.helper import TimestampField, uuid_value
from models.model import App, AppMode, EndUser
@ -19,20 +19,6 @@ from services.message_service import MessageService
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 = {
"id": fields.String,
"conversation_id": fields.String,

View File

@ -641,7 +641,7 @@ Chat applications support session persistence, allowing previous chat history to
"tool_input": "{\"dalle2\": {\"prompt\": \"cat\"}}",
"created_at": 1705988186,
"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"
]
},
@ -655,7 +655,7 @@ Chat applications support session persistence, allowing previous chat history to
"tool_input": "",
"created_at": 1705988199,
"observation": "",
"message_files": []
"files": []
}
]
}

View File

@ -641,7 +641,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
"tool_input": "{\"dalle2\": {\"prompt\": \"cat\"}}",
"created_at": 1705988186,
"observation": "画像はすでに作成され、ユーザーに送信されました。今すぐユーザーに確認するように伝えてください。",
"message_files": [
"files": [
"976990d2-5294-47e6-8f14-7356ba9d2d76"
]
},
@ -655,7 +655,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
"tool_input": "",
"created_at": 1705988199,
"observation": "",
"message_files": []
"files": []
}
]
}

View File

@ -657,7 +657,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
"tool_input": "{\"dalle2\": {\"prompt\": \"cat\"}}",
"created_at": 1705988186,
"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"
]
},
@ -671,7 +671,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
"tool_input": "",
"created_at": 1705988199,
"observation": "",
"message_files": []
"files": []
}
]
}