Update app.py
Browse files
app.py
CHANGED
@@ -256,7 +256,7 @@ def Internet_Search(history, messages2):
|
|
256 |
messages2 = messages2[-4:]
|
257 |
|
258 |
try:
|
259 |
-
response = chat_model.invoke(
|
260 |
except Exception as e:
|
261 |
error_message = str(e)
|
262 |
index = error_message.find("Input validation error:")
|
@@ -292,7 +292,7 @@ def Chart_Generator(history, messages3):
|
|
292 |
messages3 = messages3[-6:]
|
293 |
|
294 |
try:
|
295 |
-
response = chat_model.invoke(
|
296 |
except Exception as e:
|
297 |
error_message = str(e)
|
298 |
index = error_message.find("Input validation error:")
|
@@ -315,7 +315,7 @@ def Chart_Generator(history, messages3):
|
|
315 |
messages3 = messages3[-6:]
|
316 |
|
317 |
try:
|
318 |
-
response = chat_model.invoke(
|
319 |
except Exception as e:
|
320 |
error_message = str(e)
|
321 |
index = error_message.find("Input validation error:")
|
@@ -372,7 +372,7 @@ def Link_Scratch(history, messages4):
|
|
372 |
messages4 = messages4[-2:]
|
373 |
|
374 |
try:
|
375 |
-
response = chat_model.invoke(
|
376 |
except Exception as e:
|
377 |
error_message = str(e)
|
378 |
index = error_message.find("Input validation error:")
|
@@ -439,7 +439,7 @@ def File_Interact(history, filepath, messages5):
|
|
439 |
messages5 = messages5[-1:]
|
440 |
|
441 |
try:
|
442 |
-
response = chat_model.invoke(
|
443 |
except Exception as e:
|
444 |
error_message = str(e)
|
445 |
index = error_message.find("Input validation error:")
|
@@ -487,7 +487,7 @@ def Explore_WebSite(history, messages6):
|
|
487 |
messages6 = messages6[-2:]
|
488 |
|
489 |
try:
|
490 |
-
response = chat_model.invoke(
|
491 |
except Exception as e:
|
492 |
error_message = str(e)
|
493 |
index = error_message.find("Input validation error:")
|
|
|
256 |
messages2 = messages2[-4:]
|
257 |
|
258 |
try:
|
259 |
+
response = chat_model.invoke(messages2)
|
260 |
except Exception as e:
|
261 |
error_message = str(e)
|
262 |
index = error_message.find("Input validation error:")
|
|
|
292 |
messages3 = messages3[-6:]
|
293 |
|
294 |
try:
|
295 |
+
response = chat_model.invoke(messages3)
|
296 |
except Exception as e:
|
297 |
error_message = str(e)
|
298 |
index = error_message.find("Input validation error:")
|
|
|
315 |
messages3 = messages3[-6:]
|
316 |
|
317 |
try:
|
318 |
+
response = chat_model.invoke(messages3)
|
319 |
except Exception as e:
|
320 |
error_message = str(e)
|
321 |
index = error_message.find("Input validation error:")
|
|
|
372 |
messages4 = messages4[-2:]
|
373 |
|
374 |
try:
|
375 |
+
response = chat_model.invoke(messages4)
|
376 |
except Exception as e:
|
377 |
error_message = str(e)
|
378 |
index = error_message.find("Input validation error:")
|
|
|
439 |
messages5 = messages5[-1:]
|
440 |
|
441 |
try:
|
442 |
+
response = chat_model.invoke(messages5)
|
443 |
except Exception as e:
|
444 |
error_message = str(e)
|
445 |
index = error_message.find("Input validation error:")
|
|
|
487 |
messages6 = messages6[-2:]
|
488 |
|
489 |
try:
|
490 |
+
response = chat_model.invoke(messages6)
|
491 |
except Exception as e:
|
492 |
error_message = str(e)
|
493 |
index = error_message.find("Input validation error:")
|