Spaces:
Sleeping
Sleeping
Commit ·
f80aa41
1
Parent(s): d003812
updated tavily web search functionality
Browse files- core_logic.py +2 -1
core_logic.py
CHANGED
|
@@ -129,7 +129,8 @@ def chat_function(message, history):
|
|
| 129 |
raw_query = distill_response.choices[0].message.content.strip()
|
| 130 |
# Strip away any lingering quotes, backticks, or markdown syntax characters
|
| 131 |
optimized_query = re.sub(r"[`'\"\\n\-*#\[\]]", "", raw_query)
|
| 132 |
-
|
|
|
|
| 133 |
print(f"\nOptimized Search Query: '{optimized_query}'") # Debug log for the optimized query
|
| 134 |
|
| 135 |
# Executing clean, highly target web search under the 400-character cap
|
|
|
|
| 129 |
raw_query = distill_response.choices[0].message.content.strip()
|
| 130 |
# Strip away any lingering quotes, backticks, or markdown syntax characters
|
| 131 |
optimized_query = re.sub(r"[`'\"\\n\-*#\[\]]", "", raw_query)
|
| 132 |
+
|
| 133 |
+
print(f"len optimized_query: {len(optimized_query)}") # Debug log for query length
|
| 134 |
print(f"\nOptimized Search Query: '{optimized_query}'") # Debug log for the optimized query
|
| 135 |
|
| 136 |
# Executing clean, highly target web search under the 400-character cap
|