-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.py
More file actions
72 lines (61 loc) · 2.25 KB
/
main.py
File metadata and controls
72 lines (61 loc) · 2.25 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
from utils import *
from generation import generate_output
for current_model in MODELS.keys():
MODEL_NAME = MODELS[current_model]["name"]
MODEL_FOLDER = MODELS[current_model]["folder"]
API_MODEL = MODELS[current_model]["api_model"]
NO_SYSTEM_PROMPT = MODELS[current_model].get("no_system_prompt", False)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-4B")
llm_config = {
"config_list": [
{
"model": API_MODEL,
"api_key": "YOUR_API_KEY",
"max_tokens": 25000,
},
],
"cache_seed": None,
}
if NO_SYSTEM_PROMPT:
Generation_Agent_JSON = autogen.AssistantAgent(
name="Generation_Agent_JSON",
system_message="",
llm_config=llm_config,
)
Generation_Agent_TOON = autogen.AssistantAgent(
name="Generation_Agent_TOON",
system_message="",
llm_config=llm_config,
)
Generation_Agent_XML = autogen.AssistantAgent(
name="Generation_Agent_XML",
system_message="",
llm_config=llm_config,
)
Generation_Agent_YAML = autogen.AssistantAgent(
name="Generation_Agent_YAML",
system_message="",
llm_config=llm_config,
)
else:
Generation_Agent_JSON = autogen.AssistantAgent(
name="Generation_Agent_JSON",
system_message=system_prompt_JSON,
llm_config=llm_config,
)
Generation_Agent_TOON = autogen.AssistantAgent(
name="Generation_Agent_TOON",
system_message=system_prompt_TOON,
llm_config=llm_config,
)
Generation_Agent_XML = autogen.AssistantAgent(
name="Generation_Agent_XML",
system_message=system_prompt_XML,
llm_config=llm_config,
)
Generation_Agent_YAML = autogen.AssistantAgent(
name="Generation_Agent_YAML",
system_message=system_prompt_YAML,
llm_config=llm_config,
)
generate_output(MODEL_FOLDER, API_MODEL, CARBON_INTENSITY, tokenizer, Generation_Agent_JSON, Generation_Agent_TOON, Generation_Agent_XML, Generation_Agent_YAML, NO_SYSTEM_PROMPT)