Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Dec 25, 2024
1 parent e324f50 commit 13f2335
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/backend/base/langflow/components/tools/serp_api.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
from typing import Any

from langchain.tools import StructuredTool
from langchain_community.utilities.serpapi import SerpAPIWrapper
from langchain_core.tools import ToolException
from loguru import logger
from pydantic import BaseModel, Field

from langflow.custom import Component
from langflow.field_typing import Tool
from langflow.inputs import DictInput, IntInput, MultilineInput, SecretStrInput
from langflow.schema import Data
from langflow.io import Output
from langflow.schema import Data
from langflow.schema.message import Message


Expand Down Expand Up @@ -64,7 +62,6 @@ def _build_wrapper(self, params: dict[str, Any] | None = None) -> SerpAPIWrapper
)
return SerpAPIWrapper(serpapi_api_key=self.serpapi_api_key)


def run_model(self) -> list[Data]:
return self.fetch_content()

Expand Down Expand Up @@ -100,7 +97,7 @@ def search_func(
logger.debug(error_message)
raise ToolException(error_message) from e
return limited_results

results = search_func(
self.input_value,
params=self.search_params,
Expand Down

0 comments on commit 13f2335

Please sign in to comment.