Spaces:
Sleeping
Sleeping
Update multiagents.py
Browse files- multiagents.py +5 -0
multiagents.py
CHANGED
|
@@ -65,6 +65,8 @@ try:
|
|
| 65 |
api_key=os.getenv("groq_api"),
|
| 66 |
model_id = "qwen/qwen3-32b"
|
| 67 |
)
|
|
|
|
|
|
|
| 68 |
test_messages = [{"role": "user", "content": "What are the 3 laws of robotics"}]
|
| 69 |
output_test = My_Agent(test_messages)
|
| 70 |
print('1', output_test)
|
|
@@ -75,6 +77,9 @@ except:
|
|
| 75 |
|
| 76 |
if not api_key:
|
| 77 |
raise ValueError("GROQ_API_KEY environment variable is not set")
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
# Fixed model initialization - use LiteLLMModel instead of InferenceClientModel for Groq
|
| 80 |
My_Agent = LiteLLMModel(
|
|
|
|
| 65 |
api_key=os.getenv("groq_api"),
|
| 66 |
model_id = "qwen/qwen3-32b"
|
| 67 |
)
|
| 68 |
+
if api_key:
|
| 69 |
+
api_key.strip()
|
| 70 |
test_messages = [{"role": "user", "content": "What are the 3 laws of robotics"}]
|
| 71 |
output_test = My_Agent(test_messages)
|
| 72 |
print('1', output_test)
|
|
|
|
| 77 |
|
| 78 |
if not api_key:
|
| 79 |
raise ValueError("GROQ_API_KEY environment variable is not set")
|
| 80 |
+
if api_key:
|
| 81 |
+
api_key.strip()
|
| 82 |
+
|
| 83 |
|
| 84 |
# Fixed model initialization - use LiteLLMModel instead of InferenceClientModel for Groq
|
| 85 |
My_Agent = LiteLLMModel(
|