forked from PromptEngineer48/AutoGPT_Local_LLMs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
53 lines (40 loc) · 1.06 KB
/
app.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
48
49
50
51
52
53
#install these two libraries
# pip install pyautogen
# pip install xgboost
from autogen import AssistantAgent, UserProxyAgent
# config_list = [
# {
# 'model': 'gpt-4-0613',
# 'api_key': 'YOUR OPENAI API KEY: NOT REQUIRED'
# }
# ]
config_list = [{
"api_type" : "open_ai",
"api_base" : "http://localhost:1234/v1",
"api_key" : "NULL"
}
]
llm_config = {'config_list': config_list}
#create an instance of AssistanAgent
assistant = AssistantAgent(
name = "assistant",
llm_config=llm_config,
)
#create an instance of UserProxyAgent
user_proxy = UserProxyAgent(
name="user_proxy",
human_input_mode="NEVER",
max_consecutive_auto_reply=100,
)
# user_proxy.initiate_chat(
# assistant,
# message = """Write me a python function to print the number 1 though 30"""
# )
user_proxy.initiate_chat(
assistant,
message = """Write me a python function to check for prime number and the check for the number 79"""
)
# user_proxy.initiate_chat(
# assistant,
# message = """Write a python code for a snake game"""
# )