-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_models.py
More file actions
executable file
·104 lines (95 loc) · 3.75 KB
/
setup_models.py
File metadata and controls
executable file
·104 lines (95 loc) · 3.75 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#\!/usr/bin/env python3
import json
from pathlib import Path
CONFIG_DIR = Path("config")
CONFIG_DIR.mkdir(exist_ok=True)
MODEL_CONFIG_FILE = CONFIG_DIR / "models.json"
# Initial configuration
CONFIG = {
"enabled_models": [
# Anthropic models
"anthropic/claude-3.7-sonnet:beta",
"anthropic/claude-3.7-sonnet",
"anthropic/claude-3.5-sonnet",
"anthropic/claude-3.5-haiku",
# OpenAI models
"openai/gpt-4o-2024-11-20",
"openai/o3-mini",
"openai/o3-mini-high",
# Google models
"google/gemini-2.0-flash-lite-001",
"google/gemini-pro-1.5",
"google/gemini-pro-2.0-exp",
# Other popular models
"mistralai/mistral-large",
"x-ai/grok-beta",
"meta-llama/llama-3-70b-instruct"
],
"favorite_models": [
"anthropic/claude-3.7-sonnet:beta",
"anthropic/claude-3.5-sonnet",
"openai/gpt-4o-2024-11-20",
"openai/o3-mini",
"google/gemini-pro-1.5"
],
"default_model": "anthropic/claude-3.7-sonnet:beta",
"last_updated": None,
"aliases": {
# Common shorthand aliases for families
"claude": "anthropic/claude-3.7-sonnet:beta",
"opus": "anthropic/claude-3.7-sonnet:beta",
"sonnet": "anthropic/claude-3.5-sonnet",
"haiku": "anthropic/claude-3.5-haiku",
"gpt4": "openai/gpt-4o-2024-11-20",
"4o": "openai/gpt-4o-2024-11-20",
"o3": "openai/o3-mini",
"o3mini": "openai/o3-mini",
"o3high": "openai/o3-mini-high",
"gemini": "google/gemini-pro-1.5",
"gemini2": "google/gemini-pro-2.0-exp",
"geminilite": "google/gemini-2.0-flash-lite-001",
"mistral": "mistralai/mistral-large",
"grok": "x-ai/grok-beta",
"llama": "meta-llama/llama-3-70b-instruct",
# Version-specific aliases
"claude-3.7": "anthropic/claude-3.7-sonnet:beta",
"claude-3.5s": "anthropic/claude-3.5-sonnet",
"claude-3.5h": "anthropic/claude-3.5-haiku",
"gpt-4o": "openai/gpt-4o-2024-11-20",
"chatgpt-4o": "openai/gpt-4o-2024-11-20",
# Short names
"c37": "anthropic/claude-3.7-sonnet:beta",
"c35s": "anthropic/claude-3.5-sonnet",
"c35h": "anthropic/claude-3.5-haiku",
"g15": "google/gemini-pro-1.5",
"g2": "google/gemini-pro-2.0-exp",
"g2lite": "google/gemini-2.0-flash-lite-001"
},
"model_personalities": {
"anthropic/claude-3.7-sonnet:beta": "Claude 3.7 Sonnet",
"anthropic/claude-3.7-sonnet": "Claude 3.7 Sonnet",
"anthropic/claude-3.5-sonnet": "Claude 3.5 Sonnet",
"anthropic/claude-3.5-haiku": "Claude 3.5 Haiku",
"openai/gpt-4o-2024-11-20": "GPT-4o",
"openai/o3-mini": "O3 Mini",
"openai/o3-mini-high": "O3 Mini (High Reasoning)",
"google/gemini-2.0-flash-lite-001": "Gemini 2.0 Flash Lite",
"google/gemini-pro-1.5": "Gemini Pro 1.5",
"google/gemini-pro-2.0-exp": "Gemini Pro 2.0 Experimental",
"mistralai/mistral-large": "Mistral Large",
"x-ai/grok-beta": "Grok Beta",
"meta-llama/llama-3-70b-instruct": "Llama 3 70B"
}
}
def setup_models():
print(f"Creating model configuration in {MODEL_CONFIG_FILE}")
with open(MODEL_CONFIG_FILE, "w") as f:
json.dump(CONFIG, f, indent=2)
print("Model configuration created successfully.")
print(f"Default model: {CONFIG['default_model']}")
print(f"Enabled {len(CONFIG['enabled_models'])} models")
print(f"Added {len(CONFIG['favorite_models'])} favorites")
print(f"Configured {len(CONFIG['aliases'])} aliases")
print(f"Defined {len(CONFIG['model_personalities'])} model personalities")
if __name__ == "__main__":
setup_models()