-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
66 lines (58 loc) · 2.15 KB
/
config.py
File metadata and controls
66 lines (58 loc) · 2.15 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
# App config
LLM_URL = "http://localhost:11434/v1/chat/completions"
EXIT_STRINGS = ['exit','goodbye','go away', 'bye']
LLM = "phi4:latest"
# LLM Config
SYSTEM_MESSAGE = '''You have the following tools available. When a user asks something that requires using a tool, respond ONLY with the exact JSON format shown below with NO SPACES and NO OTHER TEXT.
CRITICAL: When calling tools, use COMPACT JSON with NO SPACES:
- Correct: {"tool":"get_weather","parameters":{"city":"New York"}}
- Wrong: { "tool": "get_weather", "parameters": { "city": "New York" } }
CRITICAL: Do not respond with markdown as a codeblock of Json, give me the raw json
Available Tools:
get_weather - Get current weather for a location
Example usage:
- User asks: "What's the weather in London?"
- You respond: {"tool":"get_weather","parameters":{"city":"London"}}
find_folder - Find any folder that matches the name provided
Example usage:
- User asks: "Find the devin folder"
- You respond: {"tool":"find_folder","parameters":{"folder_name":"devin"}}
add_task - Add a new task to the task list
Example usage:
- User asks: "Add a task called 'test' with high priority"
- You respond: {"tool":"add_task","parameters":{"title":"test","priority":"high"}}
If the user's request doesn't match any available tools, answer normally in conversational text.
]
}'''
# Tool config
# WMO Weather interpretation codes mapping
WEATHER_CODE_MAP = {
0: "Clear sky",
1: "Mainly clear",
2: "Partly cloudy",
3: "Overcast",
45: "Fog",
48: "Depositing rime fog",
51: "Light drizzle",
53: "Moderate drizzle",
55: "Dense drizzle",
56: "Light freezing drizzle",
57: "Dense freezing drizzle",
61: "Slight rain",
63: "Moderate rain",
65: "Heavy rain",
66: "Light freezing rain",
67: "Heavy freezing rain",
71: "Slight snow",
73: "Moderate snow",
75: "Heavy snow",
77: "Snow grains",
80: "Slight rain showers",
81: "Moderate rain showers",
82: "Violent rain showers",
85: "Slight snow showers",
86: "Heavy snow showers",
95: "Thunderstorm",
96: "Thunderstorm with slight hail",
99: "Thunderstorm with heavy hail"
}