Extracted developer prompt and fixed log tool file location
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ class LogTool(BaseTool):
|
||||
return error_message
|
||||
|
||||
def _get_log_contents(self, line_count=None):
|
||||
log_file_path = 'tools/tool_output.log'
|
||||
log_file_path = 'logs/output.log'
|
||||
|
||||
if not os.path.exists(log_file_path):
|
||||
error_message = "Log file does not exist."
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
# tools/weather_tool.py
|
||||
from .base_tool import BaseTool
|
||||
|
||||
class WeatherTool(BaseTool):
|
||||
def get_functions(self):
|
||||
return [{
|
||||
"name": "get_weather",
|
||||
"description": "Get the current weather for a location",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"location": {
|
||||
"type": "string",
|
||||
"description": "The city and state, e.g. San Francisco, CA"
|
||||
}
|
||||
},
|
||||
"required": ["location"]
|
||||
}
|
||||
}]
|
||||
|
||||
def execute(self, function_name, **kwargs):
|
||||
if function_name == "get_weather":
|
||||
location = kwargs.get("location")
|
||||
# In a real implementation, you would call a weather API here
|
||||
return f"The weather in {location} is sunny and 72°F"
|
||||
Reference in New Issue
Block a user