You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-8Lines changed: 32 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,19 +105,43 @@ Example: I converted [this article](https://www.theatlantic.com/newsletters/arch
105
105
106
106
> The script will:
107
107
>- Pull the SearxNG Docker image
108
-
>- Create and activate a Python virtual environment
109
-
>-**USERACTIONNEEDED** Set your `GOOGLE_API_KEY` (edit the script to use your real key). [Obtain your API key (Currently Gemini, OpenAI and ollama is supported)](https://ai.google.dev/gemini-api/docs/api-key) from your preferred LLM provider. (Only needed when google mode isset, elsesetin model_config.py)
110
-
>- Start the SearxNG Docker container
108
+
>- Install [infinity](https://github.com/michaelfeil/infinity) in a dedicated Python environment `infinity_env`
109
+
>- Create a Python virtual environment for CoexistAI in`coexist_env`
111
110
>- Install Python dependencies
112
-
>- Start the FastAPI server
113
111
114
-
4. **That’s it!**
115
-
The FastAPI andMCP server will start automatically and you’re ready to go.
112
+
4. **Run!**
113
+
114
+
Call `zsh quick_start.sh`or`bash quick_start.sh` to start the FastAPI server andMCP server.
116
115
117
116
**Note:**
118
117
- Make sure Docker, Python 3, and pip are installed on your system.
119
-
- Edit quick_setup.sh to set your real `GOOGLE_API_KEY` before running (needed if using google models)
120
-
- Windows users can use [WSL](https://docs.microsoft.com/en-us/windows/wsl/) or Git Bash to run the script, or follow manual setup steps.
118
+
- Edit `quick_start.sh` to set your real `GOOGLE_API_KEY` before running (needed if using google models)
119
+
120
+
121
+
### Windows user
122
+
123
+
On Windows:
124
+
125
+
1. Run a Valkey container with instructions found [here](https://github.com/valkey-io/valkey-py)
126
+
127
+
```
128
+
docker run -p 6379:6379-it valkey/valkey:latest
129
+
```
130
+
131
+
2. Run a SearXNG instance with the instructions [here](https://www.tanyongsheng.com/note/setting-up-searxng-on-windows-localhost-your-private-customizable-search-engine/).
132
+
Make sure to enable JSON output in SearXNG (otherwise you will get a 403 Forbidden error each time).
133
+
Make sure the instance work by visiting [this](http://localhost:8080/search?q=When%20was%20Napoleon%20born?&engines=google,brave&format=json) (you may need to change the port).
134
+
135
+
3. In `model_config.py`, set`START_SEARXNG = 0` (since we are running our own instance) and the correct port in`PORT_NUM_SEARXNG`
This module defines the configuration for language model (LLM) and embedding models.
4
5
Attributes:
@@ -10,7 +11,6 @@
10
11
for ollama and other local models use "others" with base_url updated in openai_compatible.
11
12
- If you using others llm type, then check the openai_compatible url dict for others key, you can generally
12
13
find it by "googling YOUR provider name openai api base compatilble url"
13
-
- "llm_base_url" (str): Base URL for the LLM API endpoint.
14
14
- "llm_tools" (list): List of tools or plugins to use with the LLM.
15
15
- "llm_kwargs" (dict): Additional keyword arguments for LLM initialization.
16
16
- "temperature" (float): Sampling temperature for generation.
@@ -23,73 +23,72 @@
23
23
- "cross_encoder_name" (str): Name of the cross-encoder model for reranking.
24
24
"""
25
25
############## PORT and HOST SETTINGS
26
-
PORT_NUM_SEARXNG=8085
26
+
PORT_NUM_SEARXNG=8080
27
27
PORT_NUM_APP=8000
28
28
HOST_APP="localhost"
29
29
HOST_SEARXNG="localhost"
30
+
START_SEARXNG=0
30
31
###############
31
32
32
33
## USER INPUTS NEEDED
33
-
#for open source model you can replace it by 'DUMMY' (for both llm and embed), else respective providers
34
-
llm_api_key=os.environ.get('GOOGLE_API_KEY', 'DUMMY') # either paste llm key, based on provider (for an instance, Google) here directly or export it in the env, else dummy for local
35
-
embed_api_key=os.environ.get('GOOGLE_API_KEY', 'DUMMY') # either paste embeder key, based on provider (for an instance, Google) here directly or export it in the env, else dummy for local
34
+
# for open source model you can replace it by 'DUMMY' (for both llm and embed), else respective providers
35
+
llm_api_key=os.environ.get(
36
+
"GOOGLE_API_KEY", "DUMMY"
37
+
) # either paste llm key, based on provider (for an instance, Google) here directly or export it in the env, else dummy for local
38
+
embed_api_key=os.environ.get(
39
+
"GOOGLE_API_KEY", "DUMMY"
40
+
) # either paste embeder key, based on provider (for an instance, Google) here directly or export it in the env, else dummy for local
36
41
37
42
model_config= {
38
43
# Name of the LLM model to use. For local models, use the model name served by your local server.
39
-
"llm_model_name": "gemini-2.0-flash",
40
-
41
-
# LLM provider type: choose from 'google', 'local', 'groq', or 'openai' or 'others'
42
-
# in case of 'others' (base url needs to be updated in openai_compatible given below accordingly).
44
+
"llm_model_name": "yasserrmd/jan-nano-4b",
45
+
# LLM provider type: choose from 'google', 'local', 'groq', or 'openai' or 'others'
46
+
# in case of 'others' (base url needs to be updated in the `openai_compatible` dictionary below).
43
47
# Make sure to update the api_key variable above to match the provider.
44
48
# "local" is for lmstudio, for ollama and other local models use "others" with base_url updated in openai_compatible.
45
49
# You can generally find it by "googling YOUR PROVIDER (example ollama) name openai api base compatible url"
46
-
"llm_type": "google",
47
-
50
+
"llm_type": "others",
48
51
# List of tools or plugins to use with the LLM, if any. Set to None if not used.
49
52
"llm_tools": None,
50
-
51
53
# Additional keyword arguments for LLM initialization.
52
54
"llm_kwargs": {
53
55
"temperature": 0.1, # Sampling temperature for generation.
54
56
"max_tokens": None, # Maximum number of tokens to generate (None for default).
55
-
"timeout": None, # Timeout for API requests (None for default).
56
-
"max_retries": 2, # Maximum number of retries for failed requests.
57
+
"timeout": None, # Timeout for API requests (None for default).
58
+
"max_retries": 2, # Maximum number of retries for failed requests.
57
59
"api_key": llm_api_key, # API key for authentication.
58
60
},
59
-
60
61
# Name of the embedding model to use.
61
62
# For Google, use their embedding model names. For local/HuggingFace, use the model path or name.
62
-
"embedding_model_name": "models/embedding-001",
63
-
64
-
"embed_kwargs":{"google_api_key": embed_api_key}, #optional additional kwargs for embedding model initialization
65
-
63
+
# Tested models can be found at https://github.com/michaelfeil/infinity?tab=readme-ov-file#supported-tasks-and-models-by-infinity
0 commit comments