bwilkie commited on
Commit
05355ee
·
verified ·
1 Parent(s): 3ac6e06

Update multiagents.py

Browse files
Files changed (1) hide show
  1. multiagents.py +14 -30
multiagents.py CHANGED
@@ -58,36 +58,20 @@ dotenv.load_dotenv()
58
  # SETUP AND TEST
59
 
60
 
61
- try:
62
- grok_api_key = os.getenv("groq_api")
63
-
64
- #InferenceClientModel InferenceClient
65
- My_Agent = InferenceClientModel(
66
- provider="groq",
67
- api_key=grok_api_key,
68
- model_id = "qwen/qwen3-32b"
69
- )
70
-
71
- test_messages = [{"role": "user", "content": "What are the 3 laws of robotics"}]
72
- output_test = My_Agent(test_messages)
73
- print('1', output_test)
74
-
75
- except:
76
- grok_api_key = os.getenv("groq_api")
77
-
78
- if not grok_api_key:
79
- raise ValueError("GROQ_API_KEY environment variable is not set")
80
-
81
- # Fixed model initialization - use LiteLLMModel instead of InferenceClientModel for Groq
82
- My_Agent = LiteLLMModel(
83
- model_id="groq/qwen3-32b", # Use a valid Groq model ID
84
- api_key=grok_api_key,
85
- temperature=0.1,
86
- max_tokens=4000,
87
- )
88
- test_messages = [{"role": "user", "content": "What are the 3 laws of robotics"}]
89
- output_test = My_Agent(test_messages)
90
- print('2', output_test)
91
 
92
 
93
  # My_Agent = client.chat.completions.create(
 
58
  # SETUP AND TEST
59
 
60
 
61
+
62
+ grok_api_key = os.getenv("groq_api")
63
+
64
+ #InferenceClientModel InferenceClient
65
+ My_Agent = InferenceClientModel(
66
+ provider="groq",
67
+ api_key=grok_api_key,
68
+ model_id = "qwen/qwen3-32b"
69
+ )
70
+
71
+ # test_messages = [{"role": "user", "content": "What are the 3 laws of robotics"}]
72
+ # output_test = My_Agent(test_messages)
73
+ # print('1', output_test)
74
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
 
77
  # My_Agent = client.chat.completions.create(