Sfoglia il codice sorgente

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

### What problem does this PR solve?


### Type of change

- [x] Documentation Update
tags/v0.20.2
writinwaters 2 mesi fa
parent
commit
6e862553cb
Nessun account collegato all'indirizzo email del committer

+ 2
- 2
agent/templates/sql_assistant.json Vedi File

@@ -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"

+ 1
- 1
api/apps/sdk/chat.py Vedi File

@@ -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,

+ 1
- 1
api/db/db_models.py Vedi 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_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={})


+ 10
- 6
docs/references/http_api_reference.md Vedi File

@@ -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"
}
],

+ 1
- 1
sdk/python/ragflow_sdk/modules/chat.py Vedi File

@@ -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. "

+ 1
- 1
sdk/python/ragflow_sdk/ragflow.py Vedi File

@@ -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. "

+ 1
- 1
sdk/python/test/test_http_api/test_chat_assistant_management/test_create_chat_assistant.py Vedi File

@@ -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"]

+ 1
- 1
sdk/python/test/test_http_api/test_chat_assistant_management/test_update_chat_assistant.py Vedi File

@@ -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"]

+ 1
- 1
test/testcases/test_http_api/test_chat_assistant_management/test_create_chat_assistant.py Vedi File

@@ -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"]

+ 1
- 1
test/testcases/test_http_api/test_chat_assistant_management/test_update_chat_assistant.py Vedi File

@@ -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"]

+ 1
- 1
test/testcases/test_sdk_api/test_chat_assistant_management/test_create_chat_assistant.py Vedi File

@@ -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)

+ 1
- 1
test/testcases/test_sdk_api/test_chat_assistant_management/test_update_chat_assistant.py Vedi File

@@ -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.',
},

+ 1
- 1
web/src/locales/en.ts Vedi 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.`,
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',

+ 1
- 1
web/src/pages/agent/constant.tsx Vedi File

@@ -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(

+ 1
- 1
web/src/pages/flow/constant.tsx Vedi File

@@ -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(

Loading…
Annulla
Salva