Spaces:
Sleeping
Sleeping
Commit ·
890c54c
1
Parent(s): 109e9aa
fixed message send issues
Browse files- core_logic.py +6 -0
core_logic.py
CHANGED
|
@@ -116,8 +116,14 @@ def chat_function(message, history):
|
|
| 116 |
)
|
| 117 |
optimized_query = distill_response.choices[0].message.content.strip()
|
| 118 |
|
|
|
|
|
|
|
| 119 |
# Executing clean, highly target web search under the 400-character cap
|
| 120 |
research_context = web_search(optimized_query)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
prompt = f"RESEARCH:\n{research_context}\n\nFILES:\n{context_from_files}\n\nUSER: {optimized_query}"
|
| 122 |
#research_context = web_search(user_text)
|
| 123 |
#prompt = f"RESEARCH:\n{research_context}\n\nFILES:\n{context_from_files}\n\nUSER: {user_text}"
|
|
|
|
| 116 |
)
|
| 117 |
optimized_query = distill_response.choices[0].message.content.strip()
|
| 118 |
|
| 119 |
+
print(f"\nOptimized Search Query: '{optimized_query}'") # Debug log for the optimized query
|
| 120 |
+
|
| 121 |
# Executing clean, highly target web search under the 400-character cap
|
| 122 |
research_context = web_search(optimized_query)
|
| 123 |
+
|
| 124 |
+
#print(f"\nResearch Context Retrieved: {research_context[:500]}...")
|
| 125 |
+
print(f"\nResearch Context Retrieved: {research_context}...") # Debug log for research context snippet
|
| 126 |
+
|
| 127 |
prompt = f"RESEARCH:\n{research_context}\n\nFILES:\n{context_from_files}\n\nUSER: {optimized_query}"
|
| 128 |
#research_context = web_search(user_text)
|
| 129 |
#prompt = f"RESEARCH:\n{research_context}\n\nFILES:\n{context_from_files}\n\nUSER: {user_text}"
|