Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,8 +11,13 @@ from typing import Optional
|
|
| 11 |
from Gradio_UI import GradioUI
|
| 12 |
|
| 13 |
@tool
|
| 14 |
-
def
|
| 15 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
base_url = "https://www.brampton.ca/EN/residents/Animal-Services/Pages/Adoption.aspx"
|
| 18 |
|
|
@@ -129,7 +134,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 129 |
|
| 130 |
agent = CodeAgent(
|
| 131 |
model=model,
|
| 132 |
-
tools=[
|
| 133 |
max_steps=6,
|
| 134 |
verbosity_level=1,
|
| 135 |
grammar=None,
|
|
|
|
| 11 |
from Gradio_UI import GradioUI
|
| 12 |
|
| 13 |
@tool
|
| 14 |
+
def get_pets_available_for_adoption(animal_type: Optional[str] = None, breed: Optional[str] = None):
|
| 15 |
+
"""A tool that finds the specified animal and breed from the Brampton Animal Shelter website.
|
| 16 |
+
|
| 17 |
+
Args:
|
| 18 |
+
animal_type: The type of animal to search for (e.g., "dog", "cat", "bird", "other"). If None, returns all types.
|
| 19 |
+
breed: The specific breed or species name to filter by. If None, returns all breeds.
|
| 20 |
+
"""
|
| 21 |
|
| 22 |
base_url = "https://www.brampton.ca/EN/residents/Animal-Services/Pages/Adoption.aspx"
|
| 23 |
|
|
|
|
| 134 |
|
| 135 |
agent = CodeAgent(
|
| 136 |
model=model,
|
| 137 |
+
tools=[get_pets_available_for_adoption, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
|
| 138 |
max_steps=6,
|
| 139 |
verbosity_level=1,
|
| 140 |
grammar=None,
|