-
Notifications
You must be signed in to change notification settings - Fork 0
/
terminate.py
43 lines (39 loc) · 1.31 KB
/
terminate.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
import os
from autogen import ConversableAgent
ollama_config = {
'config_list': [
{
'model': 'llama3',
'temperature': 0.0,
'api_key': 'llama3', # Not needed
'base_url': 'http://localhost:11434/v1'
}
],
}
agent_pm = ConversableAgent(
'Project Manager',
system_message="""
Your are a project manager for a software application.
You communicate with backend developer.
Your provide tasks and requirements to the backend developer.
""",
llm_config=ollama_config,
code_execution_config=False,
function_map=None,
human_input_mode='TERMINATE',
)
agent_dev = ConversableAgent(
'Backend Developer',
system_message="""
Your are a backend developer for a software application.
You communicate with project manager.
Your provide estimates in hours for the received tasks.
""",
llm_config=ollama_config,
code_execution_config=False,
function_map=None,
human_input_mode='TERMINATE',
)
initial_message = 'Your task is to implement simple backend microservice that has one REST API endpoint that returns "Hello World" test message. The microservice should be implemented in Node.js using Express.js framework.'
result = agent_pm.initiate_chat(
agent_dev, message=initial_message, max_turns=3)