Update serper_dev_tool.py

stirng -> string
This commit is contained in:
Ikko Eltociear Ashimine
2024-03-17 12:32:08 +09:00
committed by GitHub
parent cf4f49c6e9
commit c09f62cf47

View File

@@ -31,10 +31,10 @@ class SerperDevTool(BaseTool):
results = response.json()
if 'organic' in results:
results = results['organic']
stirng = []
string = []
for result in results:
try:
stirng.append('\n'.join([
string.append('\n'.join([
f"Title: {result['title']}",
f"Link: {result['link']}",
f"Snippet: {result['snippet']}",
@@ -43,7 +43,7 @@ class SerperDevTool(BaseTool):
except KeyError:
next
content = '\n'.join(stirng)
content = '\n'.join(string)
return f"\nSearch results: {content}\n"
else:
return results