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

searx_search: docs updates #1175

Merged
merged 2 commits into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
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
41 changes: 16 additions & 25 deletions docs/modules/utils/examples/searx_search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@
"jukit_cell_id": "gGM9PVQX6m"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
Expand Down Expand Up @@ -109,16 +102,12 @@
"cell_type": "code",
"execution_count": 2,
"metadata": {
"jukit_cell_id": "3FyQ6yHI8K"
"jukit_cell_id": "3FyQ6yHI8K",
"tags": [
"scroll-output"
]
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
Expand Down Expand Up @@ -150,13 +139,6 @@
"jukit_cell_id": "32rDh0Mvbx"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
Expand Down Expand Up @@ -208,7 +190,10 @@
"cell_type": "code",
"execution_count": 4,
"metadata": {
"jukit_cell_id": "r7qUtvKNOh"
"jukit_cell_id": "r7qUtvKNOh",
"tags": [
"scroll-output"
]
},
"outputs": [
{
Expand Down Expand Up @@ -276,7 +261,10 @@
"cell_type": "code",
"execution_count": 5,
"metadata": {
"jukit_cell_id": "JyNgoFm0vo"
"jukit_cell_id": "JyNgoFm0vo",
"tags": [
"scroll-output"
]
},
"outputs": [
{
Expand Down Expand Up @@ -454,7 +442,10 @@
"cell_type": "code",
"execution_count": 7,
"metadata": {
"jukit_cell_id": "5NrlredKxM"
"jukit_cell_id": "5NrlredKxM",
"tags": [
"scroll-output"
]
},
"outputs": [
{
Expand Down
26 changes: 16 additions & 10 deletions langchain/utilities/searx_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
Searching
---------

ref to the run method with a custom name


Use the :meth:`run() <SearxSearchWrapper.run>` and
:meth:`results() <SearxSearchWrapper.results>` methods to query the searx API.
Other methods are are available for convenience.
Expand All @@ -45,7 +42,6 @@

.. code-block:: python

# using google and duckduckgo engines
s.run(query="what is the best search engine?")

Engine Parameters
Expand Down Expand Up @@ -284,17 +280,27 @@ def results(

Args:
query: The query to search for.

num_results: Limit the number of results to return.

engines: List of engines to use for the query.

**kwargs: extra parameters to pass to the searx API.

Returns:
A list of dictionaries with the following keys:
snippet - The description of the result.
title - The title of the result.
link - The link to the result.
engines - The engines used for the result.
category - Searx category of the result.
Dict with the following keys:

{
snippet: The description of the result.

title: The title of the result.

link: The link to the result.

engines: The engines used for the result.

category: Searx category of the result.
}


"""
Expand Down