Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -9,8 +9,11 @@ from llama_index.core.tools import FunctionTool
|
|
| 9 |
from langchain_core.tools import tool
|
| 10 |
from langchain_community.tools.tavily_search import TavilySearchResults
|
| 11 |
from llama_index.core.agent.workflow import AgentWorkflow
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
|
|
|
| 14 |
|
| 15 |
@tool
|
| 16 |
def web_search(query: str) -> list:
|
|
|
|
| 9 |
from langchain_core.tools import tool
|
| 10 |
from langchain_community.tools.tavily_search import TavilySearchResults
|
| 11 |
from llama_index.core.agent.workflow import AgentWorkflow
|
| 12 |
+
import os
|
| 13 |
+
import requests
|
| 14 |
|
| 15 |
+
hf_token = os.getenv("HF_TOKEN")
|
| 16 |
+
llm = HuggingFaceInferenceAPI(repo_id="Qwen/Qwen2.5-VL-32B-Instruct", token=hf_token)
|
| 17 |
|
| 18 |
@tool
|
| 19 |
def web_search(query: str) -> list:
|