Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
baur-krykpayev authored Jun 18, 2024
2 parents 054b6e9 + 226802f commit fd1380c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_diffs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.12.3"
runs-on: ubuntu-latest
defaults:
run:
Expand Down
11 changes: 9 additions & 2 deletions libs/community/langchain_community/tools/searx_search/tool.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
"""Tool for the SearxNG search API."""
from typing import Optional
from typing import Optional, Type

from langchain_core.callbacks import (
AsyncCallbackManagerForToolRun,
CallbackManagerForToolRun,
)
from langchain_core.pydantic_v1 import Extra, Field
from langchain_core.pydantic_v1 import BaseModel, Extra, Field
from langchain_core.tools import BaseTool

from langchain_community.utilities.searx_search import SearxSearchWrapper


class SearxSearchQueryInput(BaseModel):
"""Input for the SearxSearch tool."""

query: str = Field(description="query to look up on searx")


class SearxSearchRun(BaseTool):
"""Tool that queries a Searx instance."""

Expand All @@ -22,6 +28,7 @@ class SearxSearchRun(BaseTool):
)
wrapper: SearxSearchWrapper
kwargs: dict = Field(default_factory=dict)
args_schema: Type[BaseModel] = SearxSearchQueryInput

def _run(
self,
Expand Down
2 changes: 1 addition & 1 deletion libs/core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langchain-core"
version = "0.2.8"
version = "0.2.9"
description = "Building applications with LLMs through composability"
authors = []
license = "MIT"
Expand Down

0 comments on commit fd1380c

Please sign in to comment.