Spaces:
Running
Running
Update agents.py
Browse files
agents.py
CHANGED
@@ -12,7 +12,6 @@ from google.genai import types
|
|
12 |
|
13 |
# --- Mistral AI ---
|
14 |
from mistralai.async_client import MistralAsyncClient
|
15 |
-
from mistralai.exceptions import MistralAPIError
|
16 |
|
17 |
# --- Poke-Env ---
|
18 |
from poke_env.player import Player
|
@@ -396,9 +395,6 @@ class MistralAgent(LLMAgentBase):
|
|
396 |
# Model decided not to call a tool
|
397 |
return {"error": f"Mistral did not return a tool call. Response: {message.content}"}
|
398 |
|
399 |
-
except MistralAPIError as e:
|
400 |
-
print(f"Error during Mistral API call: {e}")
|
401 |
-
return {"error": f"Mistral API Error: {str(e)}"}
|
402 |
except Exception as e:
|
403 |
print(f"Error during Mistral API call: {e}")
|
404 |
return {"error": f"Unexpected error: {str(e)}"}
|
|
|
12 |
|
13 |
# --- Mistral AI ---
|
14 |
from mistralai.async_client import MistralAsyncClient
|
|
|
15 |
|
16 |
# --- Poke-Env ---
|
17 |
from poke_env.player import Player
|
|
|
395 |
# Model decided not to call a tool
|
396 |
return {"error": f"Mistral did not return a tool call. Response: {message.content}"}
|
397 |
|
|
|
|
|
|
|
398 |
except Exception as e:
|
399 |
print(f"Error during Mistral API call: {e}")
|
400 |
return {"error": f"Unexpected error: {str(e)}"}
|