Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1964,7 +1964,7 @@ class OpenAIHandler(AsyncStreamHandler):
|
|
1964 |
self.is_responding = False # Track if already responding
|
1965 |
self.should_stop = False # Track if conversation should stop
|
1966 |
|
1967 |
-
print(f"[INIT] Handler created with web_search={web_search_enabled}, session_id={session_id}, user={user_name}, docs={len(temporary_documents)}")
|
1968 |
|
1969 |
def copy(self):
|
1970 |
if connection_settings:
|
@@ -1987,7 +1987,7 @@ class OpenAIHandler(AsyncStreamHandler):
|
|
1987 |
)
|
1988 |
|
1989 |
print(f"[COPY] No settings found, creating default handler")
|
1990 |
-
return OpenAIHandler(web_search_enabled=False)
|
1991 |
|
1992 |
async def search_web(self, query: str) -> str:
|
1993 |
"""Perform web search and return formatted results"""
|
@@ -2300,7 +2300,7 @@ IMPORTANT: Give only ONE response per user input. Do not repeat yourself or give
|
|
2300 |
|
2301 |
|
2302 |
# Create initial handler instance
|
2303 |
-
handler = OpenAIHandler(web_search_enabled=False)
|
2304 |
|
2305 |
# Create components
|
2306 |
chatbot = gr.Chatbot(type="messages")
|
|
|
1964 |
self.is_responding = False # Track if already responding
|
1965 |
self.should_stop = False # Track if conversation should stop
|
1966 |
|
1967 |
+
print(f"[INIT] Handler created with web_search={web_search_enabled}, session_id={session_id}, user={user_name}, docs={len(temporary_documents) if temporary_documents else 0}")
|
1968 |
|
1969 |
def copy(self):
|
1970 |
if connection_settings:
|
|
|
1987 |
)
|
1988 |
|
1989 |
print(f"[COPY] No settings found, creating default handler")
|
1990 |
+
return OpenAIHandler(web_search_enabled=False, temporary_documents={})
|
1991 |
|
1992 |
async def search_web(self, query: str) -> str:
|
1993 |
"""Perform web search and return formatted results"""
|
|
|
2300 |
|
2301 |
|
2302 |
# Create initial handler instance
|
2303 |
+
handler = OpenAIHandler(web_search_enabled=False, temporary_documents={})
|
2304 |
|
2305 |
# Create components
|
2306 |
chatbot = gr.Chatbot(type="messages")
|