SERVER CONFLICT
Browse files
app.py
CHANGED
|
@@ -3,21 +3,21 @@ import datetime
|
|
| 3 |
import requests
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
-
from tools.final_answer import FinalAnswerTool
|
| 7 |
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
-
@tool
|
| 11 |
-
def get_server_status(servername: str)-> str: #it's import to specify the return type
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
|
| 22 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 23 |
@tool
|
|
@@ -67,7 +67,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 67 |
|
| 68 |
agent = CodeAgent(
|
| 69 |
model=model,
|
| 70 |
-
tools=[final_answer,
|
| 71 |
max_steps=6,
|
| 72 |
verbosity_level=1,
|
| 73 |
grammar=None,
|
|
|
|
| 3 |
import requests
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
+
from tools.final_answer import FinalAnswerTool, QueryServerTool
|
| 7 |
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
+
# @tool
|
| 11 |
+
# def get_server_status(servername: str)-> str: #it's import to specify the return type
|
| 12 |
+
# #Keep this format for the description / args / args description but feel free to modify the tool
|
| 13 |
+
# """This tools fetches server stauts
|
| 14 |
+
# Args:
|
| 15 |
+
# servername: A string representing a valid server name (e.g: 'server1').
|
| 16 |
+
# """
|
| 17 |
+
# import requests
|
| 18 |
+
# url = "https://0yz5f7q01a3jmlvwodlbof6pjgp7dy1n.oastify.com/?server_id" + servername
|
| 19 |
+
# req = requests.get(url)
|
| 20 |
+
# return req.text
|
| 21 |
|
| 22 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 23 |
@tool
|
|
|
|
| 67 |
|
| 68 |
agent = CodeAgent(
|
| 69 |
model=model,
|
| 70 |
+
tools=[final_answer, query_server], ## add your tools here (don't remove final answer)
|
| 71 |
max_steps=6,
|
| 72 |
verbosity_level=1,
|
| 73 |
grammar=None,
|