Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,14 @@ def initialize_agents(config_list, docs_path=None):
|
|
38 |
"model": _config_list[0]["model"],
|
39 |
"client": chromadb.PersistentClient(path="/tmp/chromadb"),
|
40 |
"embedding_model": "all-mpnet-base-v2",
|
41 |
-
"customized_prompt":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
"get_or_create": True,
|
43 |
"collection_name": "autogen_rag",
|
44 |
},
|
@@ -109,11 +116,10 @@ def chatbot_reply(input_text):
|
|
109 |
|
110 |
def get_description_text():
|
111 |
return """
|
112 |
-
#
|
113 |
|
114 |
This demo shows how to use the RetrieveUserProxyAgent and RetrieveAssistantAgent to build a chatbot.
|
115 |
|
116 |
-
#### [AutoGen](https://github.com/microsoft/autogen) [Discord](https://discord.gg/pAbnFJrkgZ) [Blog](https://microsoft.github.io/autogen/blog/2023/10/18/RetrieveChat) [Paper](https://arxiv.org/abs/2308.08155) [SourceCode](https://github.com/thinkall/autogen-demos)
|
117 |
"""
|
118 |
|
119 |
|
@@ -253,7 +259,13 @@ with gr.Blocks() as demo:
|
|
253 |
label="Enter your prompt for Retrieve Agent and press enter to replace the default prompt",
|
254 |
max_lines=40,
|
255 |
show_label=True,
|
256 |
-
value=
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
container=True,
|
258 |
show_copy_button=True,
|
259 |
)
|
|
|
38 |
"model": _config_list[0]["model"],
|
39 |
"client": chromadb.PersistentClient(path="/tmp/chromadb"),
|
40 |
"embedding_model": "all-mpnet-base-v2",
|
41 |
+
"customized_prompt": """You're a retrieve augmented coding assistant. You answer user's questions based on your own knowledge and the
|
42 |
+
context provided by the user. Keep the answer short. Take the term UHS as short for universal healthshare.
|
43 |
+
|
44 |
+
|
45 |
+
User's question is: {input_question}
|
46 |
+
|
47 |
+
Context is: {input_context}
|
48 |
+
""",
|
49 |
"get_or_create": True,
|
50 |
"collection_name": "autogen_rag",
|
51 |
},
|
|
|
116 |
|
117 |
def get_description_text():
|
118 |
return """
|
119 |
+
# CarynHealth AutoGen: Retrieve Chat Demo
|
120 |
|
121 |
This demo shows how to use the RetrieveUserProxyAgent and RetrieveAssistantAgent to build a chatbot.
|
122 |
|
|
|
123 |
"""
|
124 |
|
125 |
|
|
|
259 |
label="Enter your prompt for Retrieve Agent and press enter to replace the default prompt",
|
260 |
max_lines=40,
|
261 |
show_label=True,
|
262 |
+
value="""You're a retrieve augmented coding assistant. You answer user's questions based on your own knowledge and the
|
263 |
+
context provided by the user. Keep the answer short. Take the term UHS as short for universal healthshare.
|
264 |
+
|
265 |
+
|
266 |
+
User's question is: {input_question}
|
267 |
+
|
268 |
+
Context is: {input_context}""",
|
269 |
container=True,
|
270 |
show_copy_button=True,
|
271 |
)
|