bwilkie commited on
Commit
e954425
·
verified ·
1 Parent(s): 6b12716

Update multiagents.py

Browse files
Files changed (1) hide show
  1. multiagents.py +36 -22
multiagents.py CHANGED
@@ -58,32 +58,46 @@ dotenv.load_dotenv()
58
  # SETUP AND TEST
59
 
60
  try:
61
- #InferenceClientModel InferenceClient
62
- My_Agent = InferenceClientModel(
63
- provider="groq",
64
- api_key=os.getenv("GROQ_API_KEY"),
65
- model_id = "qwen/qwen3-32b"
66
- )
67
-
68
- output_test = My_Agent('What are the 3 laws of robotics')
69
- print('1', output_test)
70
 
 
 
 
71
  except:
72
- # Check if API key is available
73
- groq_api_key = os.environ.get("GROQ_API_KEY")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
- if not groq_api_key:
76
- raise ValueError("GROQ_API_KEY environment variable is not set")
77
 
78
- # Fixed model initialization - use LiteLLMModel instead of InferenceClientModel for Groq
79
- My_Agent = LiteLLMModel(
80
- model_id="groq/qwen3-32b", # Use a valid Groq model ID
81
- api_key=groq_api_key,
82
- temperature=0.1,
83
- max_tokens=4000,
84
- )
85
- output_test = MyAgent('What are the 3 laws of robotics')
86
- print('2', output_test)
87
 
88
 
89
  # My_Agent = client.chat.completions.create(
 
58
  # SETUP AND TEST
59
 
60
  try:
61
+ api_key=os.getenv("GROQ_API_KEY")
62
+ print('1', api_key)
63
+ except:
64
+ api_key=os.environ.get("GROQ_API_KEY")
65
+ print('2', api_key)
 
 
 
 
66
 
67
+ try:
68
+ api_key=os.getenv("groq_api")
69
+ print('3', api_key)
70
  except:
71
+ api_key=os.environ.get("groq_api")
72
+ print('4', api_key)
73
+
74
+ # try:
75
+ # #InferenceClientModel InferenceClient
76
+ # My_Agent = InferenceClientModel(
77
+ # provider="groq",
78
+ # api_key=os.getenv("GROQ_API_KEY"),
79
+ # model_id = "qwen/qwen3-32b"
80
+ # )
81
+
82
+ # output_test = My_Agent('What are the 3 laws of robotics')
83
+ # print('1', output_test)
84
+
85
+ # except:
86
+ # # Check if API key is available
87
+ # groq_api_key = os.environ.get("GROQ_API_KEY")
88
 
89
+ # if not groq_api_key:
90
+ # raise ValueError("GROQ_API_KEY environment variable is not set")
91
 
92
+ # # Fixed model initialization - use LiteLLMModel instead of InferenceClientModel for Groq
93
+ # My_Agent = LiteLLMModel(
94
+ # model_id="groq/qwen3-32b", # Use a valid Groq model ID
95
+ # api_key=groq_api_key,
96
+ # temperature=0.1,
97
+ # max_tokens=4000,
98
+ # )
99
+ # output_test = MyAgent('What are the 3 laws of robotics')
100
+ # print('2', output_test)
101
 
102
 
103
  # My_Agent = client.chat.completions.create(