@@ -43,7 +43,9 @@ To run the Web Search Agent:
43
43
OPENAI_API_KEY=your_openai_api_key
44
44
SEARXNG_BASE_URL=your_searxng_instance_url
45
45
```
46
- Replace ` your_openai_api_key ` with your actual OpenAI API key and ` your_searxng_instance_url ` with the URL of your SearxNG instance.
46
+ Replace ` your_openai_api_key ` with your actual OpenAI API key and ` your_searxng_instance_url ` with the URL of your SearxNG instance.
47
+ If you do not have a SearxNG instance, see the instructions below to set up one locally with docker.
48
+
47
49
48
50
5 . Run the Web Search Agent:
49
51
```
@@ -58,6 +60,30 @@ To run the Web Search Agent:
58
60
4 . The Question Answering Agent analyzes the search results and formulates a detailed answer.
59
61
5 . The main script presents the answer, along with references and follow-up questions.
60
62
63
+ ## SearxNG Setup with docker
64
+
65
+ From the [ official instructions] ( https://docs.searxng.org/admin/installation-docker.html ) :
66
+
67
+ ``` shell
68
+ mkdir my-instance
69
+ cd my-instance
70
+ export PORT=8080
71
+ docker pull searxng/searxng
72
+ docker run --rm \
73
+ -d -p ${PORT} :8080 \
74
+ -v " ${PWD} /searxng:/etc/searxng" \
75
+ -e " BASE_URL=http://localhost:$PORT /" \
76
+ -e " INSTANCE_NAME=my-instance" \
77
+ searxng/searxng
78
+ ```
79
+
80
+ Set the ` SEARXNG_BASE_URL ` environment variable to ` http://localhost:8080/ ` in your ` .env ` file.
81
+
82
+
83
+ Note: for the agent to communicate with SearxNG, the instance must enable the JSON engine, which is disabled by default.
84
+ Edit ` searxng/settings.yml ` and add ` - json ` in the ` search.formats ` section, then restart the container.
85
+
86
+
61
87
## Customization
62
88
63
89
You can customize the Web Search Agent by modifying the following:
0 commit comments