Spaces:
Sleeping
Sleeping
keyvan-Re commited on
Update prompt_utils.py
Browse files- utils/prompt_utils.py +3 -4
utils/prompt_utils.py
CHANGED
|
@@ -61,7 +61,7 @@ You play the role of an AI assistant in the field of psychology for this user ({
|
|
| 61 |
Your goal is to provide emotionally supportive, scientifically grounded, and empathetic responses.
|
| 62 |
Use the following user-specific semantic memory{semantic_memory_text} to tailor your response:
|
| 63 |
""",}
|
| 64 |
-
print(meta_prompt_dict)
|
| 65 |
return meta_prompt_dict
|
| 66 |
|
| 67 |
def generate_meta_prompt_dict_semantic_episodic_chatgpt():
|
|
@@ -141,15 +141,14 @@ def build_prompt_with_search_memory_llamaindex(
|
|
| 141 |
|
| 142 |
while not related_memos and count < retried_times:
|
| 143 |
try:
|
| 144 |
-
|
| 145 |
retriever = user_memory_index.as_retriever(
|
| 146 |
similarity_top_k=3,
|
| 147 |
)
|
| 148 |
|
| 149 |
-
|
| 150 |
nodes = retriever.retrieve(memory_search_query)
|
| 151 |
|
| 152 |
-
# تغییر سوم: استخراج متن از گرههای پیدا شده
|
| 153 |
if nodes:
|
| 154 |
related_memos = "\n\n".join([n.node.text for n in nodes])
|
| 155 |
else:
|
|
|
|
| 61 |
Your goal is to provide emotionally supportive, scientifically grounded, and empathetic responses.
|
| 62 |
Use the following user-specific semantic memory{semantic_memory_text} to tailor your response:
|
| 63 |
""",}
|
| 64 |
+
print(meta_prompt_dict)
|
| 65 |
return meta_prompt_dict
|
| 66 |
|
| 67 |
def generate_meta_prompt_dict_semantic_episodic_chatgpt():
|
|
|
|
| 141 |
|
| 142 |
while not related_memos and count < retried_times:
|
| 143 |
try:
|
| 144 |
+
|
| 145 |
retriever = user_memory_index.as_retriever(
|
| 146 |
similarity_top_k=3,
|
| 147 |
)
|
| 148 |
|
| 149 |
+
|
| 150 |
nodes = retriever.retrieve(memory_search_query)
|
| 151 |
|
|
|
|
| 152 |
if nodes:
|
| 153 |
related_memos = "\n\n".join([n.node.text for n in nodes])
|
| 154 |
else:
|