Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix:message api doc (#15568)

Mars1fab02c25a83
diff --git a/api/controllers/service_api/app/message.py b/api/controllers/service_api/app/message.py
index 1869cf67c2e..749099053db 100644
--- a/api/controllers/service_api/app/message.py
+++ b/api/controllers/service_api/app/message.py
@@ -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,
diff --git a/web/app/components/develop/template/template_chat.en.mdx b/web/app/components/develop/template/template_chat.en.mdx
index 7331dda54b5..6388edf83d9 100644
--- a/web/app/components/develop/template/template_chat.en.mdx
+++ b/web/app/components/develop/template/template_chat.en.mdx
@@ -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": []
}
]
}
diff --git a/web/app/components/develop/template/template_chat.ja.mdx b/web/app/components/develop/template/template_chat.ja.mdx
index 78f21476aba..0199951c5bc 100644
--- a/web/app/components/develop/template/template_chat.ja.mdx
+++ b/web/app/components/develop/template/template_chat.ja.mdx
@@ -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": []
}
]
}
diff --git a/web/app/components/develop/template/template_chat.zh.mdx b/web/app/components/develop/template/template_chat.zh.mdx
index e4a426462e3..c3fcb849e1c 100644
--- a/web/app/components/develop/template/template_chat.zh.mdx
+++ b/web/app/components/develop/template/template_chat.zh.mdx
@@ -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": []
}
]
}