diff --git a/agent/templates/sql_assistant.json b/agent/templates/sql_assistant.json index fe8bc8c46c..810f1a1f6d 100644 --- a/agent/templates/sql_assistant.json +++ b/agent/templates/sql_assistant.json @@ -206,7 +206,7 @@ "enablePrologue": true, "inputs": {}, "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": [] @@ -319,7 +319,7 @@ "enablePrologue": true, "inputs": {}, "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", "name": "begin" diff --git a/api/apps/sdk/chat.py b/api/apps/sdk/chat.py index fc3559d585..3ccaa3ab81 100644 --- a/api/apps/sdk/chat.py +++ b/api/apps/sdk/chat.py @@ -99,7 +99,7 @@ def create(tenant_id): Here is the knowledge base: {knowledge} 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}], "empty_response": "Sorry! No relevant content was found in the knowledge base!", "quote": True, diff --git a/api/db/db_models.py b/api/db/db_models.py index 6438cf39cd..1db9e10787 100644 --- a/api/db/db_models.py +++ b/api/db/db_models.py @@ -742,7 +742,7 @@ class Dialog(DataBaseModel): prompt_type = CharField(max_length=16, null=False, default="simple", help_text="simple|advanced", index=True) prompt_config = JSONField( 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={}) diff --git a/docs/references/http_api_reference.md b/docs/references/http_api_reference.md index fc6c3bef06..a9611906cd 100644 --- a/docs/references/http_api_reference.md +++ b/docs/references/http_api_reference.md @@ -1894,7 +1894,7 @@ Success: "prompt": { "empty_response": "Sorry! No relevant content was found in the knowledge base!", "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 ", "rerank_model": "", "similarity_threshold": 0.2, @@ -2139,7 +2139,7 @@ Success: "prompt": { "empty_response": "Sorry! No relevant content was found in the knowledge base!", "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", "rerank_model": "", "similarity_threshold": 0.2, @@ -2534,7 +2534,7 @@ data:{ "code": 0, "message": "", "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": {}, "audio_binary": null, "id": null, @@ -2638,6 +2638,10 @@ Failure: ### 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` Creates a session with an agent. @@ -2750,7 +2754,7 @@ Success: "message_history_window_size": 22, "mode": "conversational", "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" } }, @@ -2803,7 +2807,7 @@ Success: } }, "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", "name": "begin" @@ -2860,7 +2864,7 @@ Success: "id": "0b02fe80780e11f084adcfdc3ed1d902", "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" } ], diff --git a/sdk/python/ragflow_sdk/modules/chat.py b/sdk/python/ragflow_sdk/modules/chat.py index b70dcb4d9c..5935b5b708 100644 --- a/sdk/python/ragflow_sdk/modules/chat.py +++ b/sdk/python/ragflow_sdk/modules/chat.py @@ -47,7 +47,7 @@ class Chat(Base): self.variables = [{"key": "knowledge", "optional": True}] self.rerank_model = "" 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.prompt = ( "You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. " diff --git a/sdk/python/ragflow_sdk/ragflow.py b/sdk/python/ragflow_sdk/ragflow.py index 99108abdc4..b38851aad3 100644 --- a/sdk/python/ragflow_sdk/ragflow.py +++ b/sdk/python/ragflow_sdk/ragflow.py @@ -143,7 +143,7 @@ class RAGFlow: }, ) 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: prompt.prompt = ( "You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. " diff --git a/sdk/python/test/test_http_api/test_chat_assistant_management/test_create_chat_assistant.py b/sdk/python/test/test_http_api/test_chat_assistant_management/test_create_chat_assistant.py index 4c647279a7..1255762b5e 100644 --- a/sdk/python/test/test_http_api/test_chat_assistant_management/test_create_chat_assistant.py +++ b/sdk/python/test/test_http_api/test_chat_assistant_management/test_create_chat_assistant.py @@ -221,7 +221,7 @@ class TestChatAssistantCreate: assert res["data"]["prompt"]["variables"] == [{"key": "knowledge", "optional": False}] 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"]["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"]["prompt"] diff --git a/sdk/python/test/test_http_api/test_chat_assistant_management/test_update_chat_assistant.py b/sdk/python/test/test_http_api/test_chat_assistant_management/test_update_chat_assistant.py index e21f078dc4..e22862eb5d 100644 --- a/sdk/python/test/test_http_api/test_chat_assistant_management/test_update_chat_assistant.py +++ b/sdk/python/test/test_http_api/test_chat_assistant_management/test_update_chat_assistant.py @@ -218,7 +218,7 @@ class TestChatAssistantUpdate: assert res["data"]["prompt"][0]["variables"] == [{"key": "knowledge", "optional": False}] 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]["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]["prompt"] diff --git a/test/testcases/test_http_api/test_chat_assistant_management/test_create_chat_assistant.py b/test/testcases/test_http_api/test_chat_assistant_management/test_create_chat_assistant.py index 7e7d9c1161..5e0591bc08 100644 --- a/test/testcases/test_http_api/test_chat_assistant_management/test_create_chat_assistant.py +++ b/test/testcases/test_http_api/test_chat_assistant_management/test_create_chat_assistant.py @@ -222,7 +222,7 @@ class TestChatAssistantCreate: assert res["data"]["prompt"]["variables"] == [{"key": "knowledge", "optional": False}] 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"]["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"]["prompt"] diff --git a/test/testcases/test_http_api/test_chat_assistant_management/test_update_chat_assistant.py b/test/testcases/test_http_api/test_chat_assistant_management/test_update_chat_assistant.py index 54a1613193..08f31f4132 100644 --- a/test/testcases/test_http_api/test_chat_assistant_management/test_update_chat_assistant.py +++ b/test/testcases/test_http_api/test_chat_assistant_management/test_update_chat_assistant.py @@ -219,7 +219,7 @@ class TestChatAssistantUpdate: assert res["data"]["prompt"][0]["variables"] == [{"key": "knowledge", "optional": False}] 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]["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]["prompt"] diff --git a/test/testcases/test_sdk_api/test_chat_assistant_management/test_create_chat_assistant.py b/test/testcases/test_sdk_api/test_chat_assistant_management/test_create_chat_assistant.py index 7ba87a2a92..033b66d3bc 100644 --- a/test/testcases/test_sdk_api/test_chat_assistant_management/test_create_chat_assistant.py +++ b/test/testcases/test_sdk_api/test_chat_assistant_management/test_create_chat_assistant.py @@ -207,7 +207,7 @@ class TestChatAssistantCreate: assert attrgetter("variables")(chat_assistant.prompt) == [{"key": "knowledge", "optional": False}] 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("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("prompt")(chat_assistant.prompt) diff --git a/test/testcases/test_sdk_api/test_chat_assistant_management/test_update_chat_assistant.py b/test/testcases/test_sdk_api/test_chat_assistant_management/test_update_chat_assistant.py index 805460d5fc..4f55de8d7c 100644 --- a/test/testcases/test_sdk_api/test_chat_assistant_management/test_update_chat_assistant.py +++ b/test/testcases/test_sdk_api/test_chat_assistant_management/test_update_chat_assistant.py @@ -200,7 +200,7 @@ class TestChatAssistantUpdate: "variables": [{"key": "knowledge", "optional": False}], "rerank_model": "", "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, "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.', }, diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts index 3250a36744..6e179bcc5d 100644 --- a/web/src/locales/en.ts +++ b/web/src/locales/en.ts @@ -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.`, 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', - 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.', knowledgeBases: 'Knowledge bases', knowledgeBasesMessage: 'Please select', diff --git a/web/src/pages/agent/constant.tsx b/web/src/pages/agent/constant.tsx index fe6559f023..f102984494 100644 --- a/web/src/pages/agent/constant.tsx +++ b/web/src/pages/agent/constant.tsx @@ -262,7 +262,7 @@ export const initialRetrievalValues = { export const initialBeginValues = { 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( diff --git a/web/src/pages/flow/constant.tsx b/web/src/pages/flow/constant.tsx index ce146ae00d..79a58baa03 100644 --- a/web/src/pages/flow/constant.tsx +++ b/web/src/pages/flow/constant.tsx @@ -411,7 +411,7 @@ export const initialRetrievalValues = { }; 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(