Spaces:
Runtime error
Runtime error
ernani commited on
Commit ·
ddccd63
1
Parent(s): 53e52ec
adding duck duck go search
Browse files- requirements.txt +1 -0
- tools.py +2 -2
requirements.txt
CHANGED
|
@@ -6,4 +6,5 @@ sentence-transformers
|
|
| 6 |
langchain-huggingface
|
| 7 |
langchain-core
|
| 8 |
langchain_openai
|
|
|
|
| 9 |
langgraph
|
|
|
|
| 6 |
langchain-huggingface
|
| 7 |
langchain-core
|
| 8 |
langchain_openai
|
| 9 |
+
duckduckgo-search
|
| 10 |
langgraph
|
tools.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
from langchain.tools import Tool
|
| 2 |
-
from langchain_community.tools
|
| 3 |
from langgraph.store.memory import InMemoryStore
|
| 4 |
import random
|
| 5 |
from huggingface_hub import list_models
|
| 6 |
|
| 7 |
# Initialize the DuckDuckGo search tool
|
| 8 |
-
search_tool =
|
| 9 |
|
| 10 |
# Initialize the memory store
|
| 11 |
store = InMemoryStore(index={"embed": "openai:text-embedding-3-small"})
|
|
|
|
| 1 |
from langchain.tools import Tool
|
| 2 |
+
from langchain_community.tools import DuckDuckGoSearchRun
|
| 3 |
from langgraph.store.memory import InMemoryStore
|
| 4 |
import random
|
| 5 |
from huggingface_hub import list_models
|
| 6 |
|
| 7 |
# Initialize the DuckDuckGo search tool
|
| 8 |
+
search_tool = DuckDuckGoSearchRun()
|
| 9 |
|
| 10 |
# Initialize the memory store
|
| 11 |
store = InMemoryStore(index={"embed": "openai:text-embedding-3-small"})
|