Update multi_agent.py
Browse files- multi_agent.py +18 -7
multi_agent.py
CHANGED
@@ -41,15 +41,26 @@ def get_latest_file(directory, file_extension):
|
|
41 |
|
42 |
def run_multi_agent(llm, task):
|
43 |
#llm_config = {"model": llm}
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
"api_key": os.environ.get("GROQ_API_KEY"),
|
49 |
"base_url": "https://api.groq.com/openai/v1"
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
|
54 |
executor = LocalCommandLineCodeExecutor(
|
55 |
timeout=60,
|
|
|
41 |
|
42 |
def run_multi_agent(llm, task):
|
43 |
#llm_config = {"model": llm}
|
44 |
+
if not GROQ_API_KEY_defualt:
|
45 |
+
llm_config = {
|
46 |
+
"config_list": [
|
47 |
+
{
|
48 |
+
"model": llm, #"llama3-8b-8192",
|
49 |
+
"api_key": os.environ.get("GROQ_API_KEY_defualt"),
|
50 |
+
"base_url": "https://api.groq.com/openai/v1"
|
51 |
+
}
|
52 |
+
]
|
53 |
+
}
|
54 |
+
else GROQ_API_KEY:
|
55 |
+
llm_config = {
|
56 |
+
"config_list": [
|
57 |
+
{
|
58 |
+
"model": llm, #"llama3-8b-8192",
|
59 |
"api_key": os.environ.get("GROQ_API_KEY"),
|
60 |
"base_url": "https://api.groq.com/openai/v1"
|
61 |
+
}
|
62 |
+
]
|
63 |
+
}
|
64 |
|
65 |
executor = LocalCommandLineCodeExecutor(
|
66 |
timeout=60,
|