Update app.py
Browse filesadding new tools
app.py
CHANGED
|
@@ -10,6 +10,20 @@ from tools.final_answer import FinalAnswerTool
|
|
| 10 |
|
| 11 |
from Gradio_UI import GradioUI
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 14 |
@tool
|
| 15 |
def diagnose_disease(symptoms: str) -> str:
|
|
@@ -81,7 +95,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 81 |
|
| 82 |
agent = CodeAgent(
|
| 83 |
model=model,
|
| 84 |
-
tools=[final_answer, diagnose_disease], ## add your tools here (don't remove final answer)
|
| 85 |
max_steps=6,
|
| 86 |
verbosity_level=1,
|
| 87 |
grammar=None,
|
|
|
|
| 10 |
|
| 11 |
from Gradio_UI import GradioUI
|
| 12 |
|
| 13 |
+
@tool
|
| 14 |
+
def shailendra_recipe(recipe: str) -> str:
|
| 15 |
+
"""
|
| 16 |
+
Randomly listing some Bihari recipe and extract the process to prepare it
|
| 17 |
+
|
| 18 |
+
Args:
|
| 19 |
+
recipe: A string with recipe name
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
return """
|
| 23 |
+
Litte chocha is a unique bihari recipe
|
| 24 |
+
Ingredents are Sattu, wheat flour and pickles
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 28 |
@tool
|
| 29 |
def diagnose_disease(symptoms: str) -> str:
|
|
|
|
| 95 |
|
| 96 |
agent = CodeAgent(
|
| 97 |
model=model,
|
| 98 |
+
tools=[final_answer, diagnose_disease, shailendra_recipe], ## add your tools here (don't remove final answer)
|
| 99 |
max_steps=6,
|
| 100 |
verbosity_level=1,
|
| 101 |
grammar=None,
|