Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add type annotation for 'status' and format multiline string in TavilyAISearch tool #4011

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/backend/base/langflow/components/tools/TavilyAISearch.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Any

import httpx
from langchain.tools import StructuredTool
from pydantic import BaseModel, Field
Expand All @@ -10,7 +12,8 @@

class TavilySearchToolComponent(LCToolComponent):
display_name = "Tavily AI Search"
description = """**Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results. It can be used independently or as an agent tool.
description = """**Tavily AI** is a search engine optimized for LLMs and RAG, \
aimed at efficient, quick, and persistent search results. It can be used independently or as an agent tool.

Note: Check 'Advanced' for all options.
"""
Expand Down Expand Up @@ -144,7 +147,7 @@ def _tavily_search(
if include_images and search_results.get("images"):
data_results.append(Data(data={"images": search_results["images"]}))

self.status = data_results
self.status: Any = data_results
return data_results

except httpx.HTTPStatusError as e:
Expand Down
Loading