Docs: Deprecated 'Create session with agent' (#9464)

### What problem does this PR solve?


### Type of change

- [x] Documentation Update
This commit is contained in:
writinwaters
2025-08-14 12:13:11 +08:00
committed by GitHub
parent b1baa91ff0
commit 6e862553cb
15 changed files with 25 additions and 21 deletions

View File

@ -206,7 +206,7 @@
"enablePrologue": true, "enablePrologue": true,
"inputs": {}, "inputs": {},
"mode": "conversational", "mode": "conversational",
"prologue": "Hi! I'm your SQL assistant, what can I do for you?" "prologue": "Hi! I'm your SQL assistant. What can I do for you?"
} }
}, },
"upstream": [] "upstream": []
@ -319,7 +319,7 @@
"enablePrologue": true, "enablePrologue": true,
"inputs": {}, "inputs": {},
"mode": "conversational", "mode": "conversational",
"prologue": "Hi! I'm your SQL assistant, what can I do for you?" "prologue": "Hi! I'm your SQL assistant. What can I do for you?"
}, },
"label": "Begin", "label": "Begin",
"name": "begin" "name": "begin"

View File

@ -99,7 +99,7 @@ def create(tenant_id):
Here is the knowledge base: Here is the knowledge base:
{knowledge} {knowledge}
The above is the knowledge base.""", The above is the knowledge base.""",
"prologue": "Hi! I'm your assistant, what can I do for you?", "prologue": "Hi! I'm your assistant. What can I do for you?",
"parameters": [{"key": "knowledge", "optional": False}], "parameters": [{"key": "knowledge", "optional": False}],
"empty_response": "Sorry! No relevant content was found in the knowledge base!", "empty_response": "Sorry! No relevant content was found in the knowledge base!",
"quote": True, "quote": True,

View File

@ -742,7 +742,7 @@ class Dialog(DataBaseModel):
prompt_type = CharField(max_length=16, null=False, default="simple", help_text="simple|advanced", index=True) prompt_type = CharField(max_length=16, null=False, default="simple", help_text="simple|advanced", index=True)
prompt_config = JSONField( prompt_config = JSONField(
null=False, null=False,
default={"system": "", "prologue": "Hi! I'm your assistant, what can I do for you?", "parameters": [], "empty_response": "Sorry! No relevant content was found in the knowledge base!"}, default={"system": "", "prologue": "Hi! I'm your assistant. What can I do for you?", "parameters": [], "empty_response": "Sorry! No relevant content was found in the knowledge base!"},
) )
meta_data_filter = JSONField(null=True, default={}) meta_data_filter = JSONField(null=True, default={})

View File

@ -1894,7 +1894,7 @@ Success:
"prompt": { "prompt": {
"empty_response": "Sorry! No relevant content was found in the knowledge base!", "empty_response": "Sorry! No relevant content was found in the knowledge base!",
"keywords_similarity_weight": 0.3, "keywords_similarity_weight": 0.3,
"opener": "Hi! I'm your assistant, what can I do for you?", "opener": "Hi! I'm your assistant. What can I do for you?",
"prompt": "You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. Please list the data in the knowledge base and answer in detail. When all knowledge base content is irrelevant to the question, your answer must include the sentence \"The answer you are looking for is not found in the knowledge base!\" Answers need to consider chat history.\n ", "prompt": "You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. Please list the data in the knowledge base and answer in detail. When all knowledge base content is irrelevant to the question, your answer must include the sentence \"The answer you are looking for is not found in the knowledge base!\" Answers need to consider chat history.\n ",
"rerank_model": "", "rerank_model": "",
"similarity_threshold": 0.2, "similarity_threshold": 0.2,
@ -2139,7 +2139,7 @@ Success:
"prompt": { "prompt": {
"empty_response": "Sorry! No relevant content was found in the knowledge base!", "empty_response": "Sorry! No relevant content was found in the knowledge base!",
"keywords_similarity_weight": 0.3, "keywords_similarity_weight": 0.3,
"opener": "Hi! I'm your assistant, what can I do for you?", "opener": "Hi! I'm your assistant. What can I do for you?",
"prompt": "You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. Please list the data in the knowledge base and answer in detail. When all knowledge base content is irrelevant to the question, your answer must include the sentence \"The answer you are looking for is not found in the knowledge base!\" Answers need to consider chat history.\n", "prompt": "You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. Please list the data in the knowledge base and answer in detail. When all knowledge base content is irrelevant to the question, your answer must include the sentence \"The answer you are looking for is not found in the knowledge base!\" Answers need to consider chat history.\n",
"rerank_model": "", "rerank_model": "",
"similarity_threshold": 0.2, "similarity_threshold": 0.2,
@ -2534,7 +2534,7 @@ data:{
"code": 0, "code": 0,
"message": "", "message": "",
"data": { "data": {
"answer": "Hi! I'm your assistant, what can I do for you?", "answer": "Hi! I'm your assistant. What can I do for you?",
"reference": {}, "reference": {},
"audio_binary": null, "audio_binary": null,
"id": null, "id": null,
@ -2638,6 +2638,10 @@ Failure:
### Create session with agent ### Create session with agent
:::danger DEPRECATED
This method is deprecated and not recommended. You can still call it but be mindful that calling `Converse with agent` will automatically generate a session ID for the associated agent.
:::
**POST** `/api/v1/agents/{agent_id}/sessions` **POST** `/api/v1/agents/{agent_id}/sessions`
Creates a session with an agent. Creates a session with an agent.
@ -2750,7 +2754,7 @@ Success:
"message_history_window_size": 22, "message_history_window_size": 22,
"mode": "conversational", "mode": "conversational",
"outputs": {}, "outputs": {},
"prologue": "Hi! I'm your assistant, what can I do for you?", "prologue": "Hi! I'm your assistant. What can I do for you?",
"tips": "Please fill up the form" "tips": "Please fill up the form"
} }
}, },
@ -2803,7 +2807,7 @@ Success:
} }
}, },
"mode": "conversational", "mode": "conversational",
"prologue": "Hi! I'm your assistant, what can I do for you?" "prologue": "Hi! I'm your assistant. What can I do for you?"
}, },
"label": "Begin", "label": "Begin",
"name": "begin" "name": "begin"
@ -2860,7 +2864,7 @@ Success:
"id": "0b02fe80780e11f084adcfdc3ed1d902", "id": "0b02fe80780e11f084adcfdc3ed1d902",
"message": [ "message": [
{ {
"content": "Hi! I'm your assistant, what can I do for you?", "content": "Hi! I'm your assistant. What can I do for you?",
"role": "assistant" "role": "assistant"
} }
], ],

View File

@ -47,7 +47,7 @@ class Chat(Base):
self.variables = [{"key": "knowledge", "optional": True}] self.variables = [{"key": "knowledge", "optional": True}]
self.rerank_model = "" self.rerank_model = ""
self.empty_response = None self.empty_response = None
self.opener = "Hi! I'm your assistant, what can I do for you?" self.opener = "Hi! I'm your assistant. What can I do for you?"
self.show_quote = True self.show_quote = True
self.prompt = ( self.prompt = (
"You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. " "You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. "

View File

@ -143,7 +143,7 @@ class RAGFlow:
}, },
) )
if prompt.opener is None: if prompt.opener is None:
prompt.opener = "Hi! I'm your assistant, what can I do for you?" prompt.opener = "Hi! I'm your assistant. What can I do for you?"
if prompt.prompt is None: if prompt.prompt is None:
prompt.prompt = ( prompt.prompt = (
"You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. " "You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. "

View File

@ -221,7 +221,7 @@ class TestChatAssistantCreate:
assert res["data"]["prompt"]["variables"] == [{"key": "knowledge", "optional": False}] assert res["data"]["prompt"]["variables"] == [{"key": "knowledge", "optional": False}]
assert res["data"]["prompt"]["rerank_model"] == "" assert res["data"]["prompt"]["rerank_model"] == ""
assert res["data"]["prompt"]["empty_response"] == "Sorry! No relevant content was found in the knowledge base!" assert res["data"]["prompt"]["empty_response"] == "Sorry! No relevant content was found in the knowledge base!"
assert res["data"]["prompt"]["opener"] == "Hi! I'm your assistant, what can I do for you?" assert res["data"]["prompt"]["opener"] == "Hi! I'm your assistant. What can I do for you?"
assert res["data"]["prompt"]["show_quote"] is True assert res["data"]["prompt"]["show_quote"] is True
assert ( assert (
res["data"]["prompt"]["prompt"] res["data"]["prompt"]["prompt"]

View File

@ -218,7 +218,7 @@ class TestChatAssistantUpdate:
assert res["data"]["prompt"][0]["variables"] == [{"key": "knowledge", "optional": False}] assert res["data"]["prompt"][0]["variables"] == [{"key": "knowledge", "optional": False}]
assert res["data"]["prompt"][0]["rerank_model"] == "" assert res["data"]["prompt"][0]["rerank_model"] == ""
assert res["data"]["prompt"][0]["empty_response"] == "Sorry! No relevant content was found in the knowledge base!" assert res["data"]["prompt"][0]["empty_response"] == "Sorry! No relevant content was found in the knowledge base!"
assert res["data"]["prompt"][0]["opener"] == "Hi! I'm your assistant, what can I do for you?" assert res["data"]["prompt"][0]["opener"] == "Hi! I'm your assistant. What can I do for you?"
assert res["data"]["prompt"][0]["show_quote"] is True assert res["data"]["prompt"][0]["show_quote"] is True
assert ( assert (
res["data"]["prompt"][0]["prompt"] res["data"]["prompt"][0]["prompt"]

View File

@ -222,7 +222,7 @@ class TestChatAssistantCreate:
assert res["data"]["prompt"]["variables"] == [{"key": "knowledge", "optional": False}] assert res["data"]["prompt"]["variables"] == [{"key": "knowledge", "optional": False}]
assert res["data"]["prompt"]["rerank_model"] == "" assert res["data"]["prompt"]["rerank_model"] == ""
assert res["data"]["prompt"]["empty_response"] == "Sorry! No relevant content was found in the knowledge base!" assert res["data"]["prompt"]["empty_response"] == "Sorry! No relevant content was found in the knowledge base!"
assert res["data"]["prompt"]["opener"] == "Hi! I'm your assistant, what can I do for you?" assert res["data"]["prompt"]["opener"] == "Hi! I'm your assistant. What can I do for you?"
assert res["data"]["prompt"]["show_quote"] is True assert res["data"]["prompt"]["show_quote"] is True
assert ( assert (
res["data"]["prompt"]["prompt"] res["data"]["prompt"]["prompt"]

View File

@ -219,7 +219,7 @@ class TestChatAssistantUpdate:
assert res["data"]["prompt"][0]["variables"] == [{"key": "knowledge", "optional": False}] assert res["data"]["prompt"][0]["variables"] == [{"key": "knowledge", "optional": False}]
assert res["data"]["prompt"][0]["rerank_model"] == "" assert res["data"]["prompt"][0]["rerank_model"] == ""
assert res["data"]["prompt"][0]["empty_response"] == "Sorry! No relevant content was found in the knowledge base!" assert res["data"]["prompt"][0]["empty_response"] == "Sorry! No relevant content was found in the knowledge base!"
assert res["data"]["prompt"][0]["opener"] == "Hi! I'm your assistant, what can I do for you?" assert res["data"]["prompt"][0]["opener"] == "Hi! I'm your assistant. What can I do for you?"
assert res["data"]["prompt"][0]["show_quote"] is True assert res["data"]["prompt"][0]["show_quote"] is True
assert ( assert (
res["data"]["prompt"][0]["prompt"] res["data"]["prompt"][0]["prompt"]

View File

@ -207,7 +207,7 @@ class TestChatAssistantCreate:
assert attrgetter("variables")(chat_assistant.prompt) == [{"key": "knowledge", "optional": False}] assert attrgetter("variables")(chat_assistant.prompt) == [{"key": "knowledge", "optional": False}]
assert attrgetter("rerank_model")(chat_assistant.prompt) == "" assert attrgetter("rerank_model")(chat_assistant.prompt) == ""
assert attrgetter("empty_response")(chat_assistant.prompt) == "Sorry! No relevant content was found in the knowledge base!" assert attrgetter("empty_response")(chat_assistant.prompt) == "Sorry! No relevant content was found in the knowledge base!"
assert attrgetter("opener")(chat_assistant.prompt) == "Hi! I'm your assistant, what can I do for you?" assert attrgetter("opener")(chat_assistant.prompt) == "Hi! I'm your assistant. What can I do for you?"
assert attrgetter("show_quote")(chat_assistant.prompt) is True assert attrgetter("show_quote")(chat_assistant.prompt) is True
assert ( assert (
attrgetter("prompt")(chat_assistant.prompt) attrgetter("prompt")(chat_assistant.prompt)

View File

@ -200,7 +200,7 @@ class TestChatAssistantUpdate:
"variables": [{"key": "knowledge", "optional": False}], "variables": [{"key": "knowledge", "optional": False}],
"rerank_model": "", "rerank_model": "",
"empty_response": "Sorry! No relevant content was found in the knowledge base!", "empty_response": "Sorry! No relevant content was found in the knowledge base!",
"opener": "Hi! I'm your assistant, what can I do for you?", "opener": "Hi! I'm your assistant. What can I do for you?",
"show_quote": True, "show_quote": True,
"prompt": 'You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. Please list the data in the knowledge base and answer in detail. When all knowledge base content is irrelevant to the question, your answer must include the sentence "The answer you are looking for is not found in the knowledge base!" Answers need to consider chat history.\n Here is the knowledge base:\n {knowledge}\n The above is the knowledge base.', "prompt": 'You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. Please list the data in the knowledge base and answer in detail. When all knowledge base content is irrelevant to the question, your answer must include the sentence "The answer you are looking for is not found in the knowledge base!" Answers need to consider chat history.\n Here is the knowledge base:\n {knowledge}\n The above is the knowledge base.',
}, },

View File

@ -445,7 +445,7 @@ This auto-tagging feature enhances retrieval by adding another layer of domain-s
emptyResponseTip: `Set this as a response if no results are retrieved from the knowledge bases for your query, or leave this field blank to allow the LLM to improvise when nothing is found.`, emptyResponseTip: `Set this as a response if no results are retrieved from the knowledge bases for your query, or leave this field blank to allow the LLM to improvise when nothing is found.`,
emptyResponseMessage: `Empty response will be triggered when nothing relevant is retrieved from knowledge bases. You must clear the 'Empty response' field if no knowledge base is selected.`, emptyResponseMessage: `Empty response will be triggered when nothing relevant is retrieved from knowledge bases. You must clear the 'Empty response' field if no knowledge base is selected.`,
setAnOpener: 'Opening greeting', setAnOpener: 'Opening greeting',
setAnOpenerInitial: `Hi! I'm your assistant, what can I do for you?`, setAnOpenerInitial: `Hi! I'm your assistant. What can I do for you?`,
setAnOpenerTip: 'Set an opening greeting for users.', setAnOpenerTip: 'Set an opening greeting for users.',
knowledgeBases: 'Knowledge bases', knowledgeBases: 'Knowledge bases',
knowledgeBasesMessage: 'Please select', knowledgeBasesMessage: 'Please select',

View File

@ -262,7 +262,7 @@ export const initialRetrievalValues = {
export const initialBeginValues = { export const initialBeginValues = {
mode: AgentDialogueMode.Conversational, mode: AgentDialogueMode.Conversational,
prologue: `Hi! I'm your assistant, what can I do for you?`, prologue: `Hi! I'm your assistant. What can I do for you?`,
}; };
export const variableCheckBoxFieldMap = Object.keys( export const variableCheckBoxFieldMap = Object.keys(

View File

@ -411,7 +411,7 @@ export const initialRetrievalValues = {
}; };
export const initialBeginValues = { export const initialBeginValues = {
prologue: `Hi! I'm your assistant, what can I do for you?`, prologue: `Hi! I'm your assistant. What can I do for you?`,
}; };
export const variableCheckBoxFieldMap = Object.keys( export const variableCheckBoxFieldMap = Object.keys(