forked from PromptEngineer48/AutoGEN_Ollama
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp5_from_old.py
47 lines (38 loc) · 896 Bytes
/
app5_from_old.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#install these two libraries
# pip install pyautogen
# pip install xgboost
from autogen import AssistantAgent, UserProxyAgent
config_list_mistral = [
{
'base_url': "http://0.0.0.0:8000",
'api_key': "NULL",
}
]
config_list_codellama = [
{
'base_url': "http://0.0.0.0:36792",
'api_key': "NULL",
}
]
llm_config_mistral={
"config_list": config_list_mistral,
}
llm_config_codellama={
"config_list": config_list_codellama,
}
#create an instance of AssistanAgent
assistant = AssistantAgent(
name = "assistant",
llm_config=llm_config_codellama,
)
#create an instance of UserProxyAgent
user_proxy = UserProxyAgent(
name="user_proxy",
human_input_mode="NEVER",
max_consecutive_auto_reply=10,
llm_config=llm_config_mistral,
)
user_proxy.initiate_chat(
assistant,
message = """Write me a python function to check for prime number and the check for the number 79"""
)