Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,9 +15,11 @@ from langgraph.graph.message import add_messages
|
|
| 15 |
from smolagents import ToolCallingAgent, LiteLLMModel, tool, DuckDuckGoSearchTool
|
| 16 |
from langchain_community.utilities import WikipediaAPIWrapper
|
| 17 |
from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
|
|
|
|
| 18 |
|
| 19 |
import uuid
|
| 20 |
|
|
|
|
| 21 |
# (Keep Constants as is)
|
| 22 |
# --- Constants ---
|
| 23 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
@@ -27,7 +29,6 @@ OPENAI_KEY=os.environ.get("OPENAI_KEY")
|
|
| 27 |
|
| 28 |
# --- Basic Agent Definition ---
|
| 29 |
# ----- THIS IS WHERE YOU CAN BUILD WHAT YOU WANT ------
|
| 30 |
-
serper_tool = GoogleSerperAPIWrapper()
|
| 31 |
|
| 32 |
def wikipedia_search(query: str) -> str:
|
| 33 |
return WikipediaAPIWrapper().run(query)
|
|
|
|
| 15 |
from smolagents import ToolCallingAgent, LiteLLMModel, tool, DuckDuckGoSearchTool
|
| 16 |
from langchain_community.utilities import WikipediaAPIWrapper
|
| 17 |
from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
|
| 18 |
+
from langchain_community.utilities import GoogleSerperAPIWrapper
|
| 19 |
|
| 20 |
import uuid
|
| 21 |
|
| 22 |
+
|
| 23 |
# (Keep Constants as is)
|
| 24 |
# --- Constants ---
|
| 25 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
|
|
| 29 |
|
| 30 |
# --- Basic Agent Definition ---
|
| 31 |
# ----- THIS IS WHERE YOU CAN BUILD WHAT YOU WANT ------
|
|
|
|
| 32 |
|
| 33 |
def wikipedia_search(query: str) -> str:
|
| 34 |
return WikipediaAPIWrapper().run(query)
|