Spaces:
Sleeping
Sleeping
Update blog_title_generator.py
Browse files- blog_title_generator.py +2 -2
blog_title_generator.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import time
|
| 2 |
import json
|
| 3 |
-
from langchain_community.tools import
|
| 4 |
from langgraph.graph import MessagesState
|
| 5 |
from langchain_core.prompts import PromptTemplate
|
| 6 |
from langchain_core.messages import HumanMessage, SystemMessage
|
|
@@ -24,7 +24,7 @@ def blog_titles_agent(llm, state):
|
|
| 24 |
Returns:
|
| 25 |
str: The result of the search query.
|
| 26 |
"""
|
| 27 |
-
search =
|
| 28 |
result = search.invoke(query)
|
| 29 |
print("Tool Call")
|
| 30 |
return result
|
|
|
|
| 1 |
import time
|
| 2 |
import json
|
| 3 |
+
from langchain_community.tools import DuckDuckGoSearchRun
|
| 4 |
from langgraph.graph import MessagesState
|
| 5 |
from langchain_core.prompts import PromptTemplate
|
| 6 |
from langchain_core.messages import HumanMessage, SystemMessage
|
|
|
|
| 24 |
Returns:
|
| 25 |
str: The result of the search query.
|
| 26 |
"""
|
| 27 |
+
search = DuckDuckGoSearchRun()
|
| 28 |
result = search.invoke(query)
|
| 29 |
print("Tool Call")
|
| 30 |
return result
|