### What problem does this PR solve? ### Type of change - [x] Documentation Updatetags/v0.20.2
| @@ -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" | |||
| @@ -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, | |||
| @@ -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={}) | |||
| @@ -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" | |||
| } | |||
| ], | |||
| @@ -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. " | |||
| @@ -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. " | |||
| @@ -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"] | |||
| @@ -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"] | |||
| @@ -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"] | |||
| @@ -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"] | |||
| @@ -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) | |||
| @@ -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.', | |||
| }, | |||
| @@ -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', | |||
| @@ -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( | |||
| @@ -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( | |||