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
- UI: whether or not to enable UI (Gradio) or just go with the API
37
37
@@ -49,10 +49,12 @@ Where `<extra>` can be any of the following:
49
49
- llms-sagemaker: adds support for Amazon Sagemaker LLM, requires Sagemaker inference endpoints
50
50
- llms-openai: adds support for OpenAI LLM, requires OpenAI API key
51
51
- llms-openai-like: adds support for 3rd party LLM providers that are compatible with OpenAI's API
52
+
- llms-azopenai: adds support for Azure OpenAI LLM, requires Azure OpenAI inference endpoints
52
53
- embeddings-ollama: adds support for Ollama Embeddings, requires Ollama running locally
53
54
- embeddings-huggingface: adds support for local Embeddings using HuggingFace
54
55
- embeddings-sagemaker: adds support for Amazon Sagemaker Embeddings, requires Sagemaker inference endpoints
55
56
- embeddings-openai = adds support for OpenAI Embeddings, requires OpenAI API key
57
+
- embeddings-azopenai = adds support for Azure OpenAI Embeddings, requires Azure OpenAI inference endpoints
56
58
- vector-stores-qdrant: adds support for Qdrant vector store
57
59
- vector-stores-chroma: adds support for Chroma DB vector store
58
60
- vector-stores-postgres: adds support for Postgres vector store
@@ -160,6 +162,29 @@ PrivateGPT will use the already existing `settings-openai.yaml` settings file, w
160
162
161
163
The UI will be available at http://localhost:8001
162
164
165
+
### Non-Private, Azure OpenAI-powered test setup
166
+
167
+
If you want to test PrivateGPT with Azure OpenAI's LLM and Embeddings -taking into account your data is going to Azure OpenAI!- you can run the following command:
168
+
169
+
You need to have access to Azure OpenAI inference endpoints for the LLM and / or the embeddings, and have Azure OpenAI credentials properly configured.
170
+
171
+
Edit the `settings-azopenai.yaml` file to include the correct Azure OpenAI endpoints.
172
+
173
+
Then, install PrivateGPT with the following command:
PrivateGPT will use the already existing `settings-azopenai.yaml` settings file, which is already configured to use Azure OpenAI LLM and Embeddings endpoints, and Qdrant.
185
+
186
+
The UI will be available at http://localhost:8001
187
+
163
188
### Local, Llama-CPP powered setup
164
189
165
190
If you want to run PrivateGPT fully locally without relying on Ollama, you can run the following command:
Copy file name to clipboardExpand all lines: fern/docs/pages/manual/llms.mdx
+37Lines changed: 37 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,43 @@ to run an OpenAI compatible server. Then, you can run PrivateGPT using the `sett
98
98
99
99
`PGPT_PROFILES=vllm make run`
100
100
101
+
### Using Azure OpenAI
102
+
103
+
If you cannot run a local model (because you don't have a GPU, for example) or for testing purposes, you may
104
+
decide to run PrivateGPT using Azure OpenAI as the LLM and Embeddings model.
105
+
106
+
In order to do so, create a profile `settings-azopenai.yaml` with the following contents:
107
+
108
+
```yaml
109
+
llm:
110
+
mode: azopenai
111
+
112
+
embedding:
113
+
mode: azopenai
114
+
115
+
azopenai:
116
+
api_key: <your_azopenai_api_key> # You could skip this configuration and use the AZ_OPENAI_API_KEY env var instead
117
+
azure_endpoint: <your_azopenai_endpoint> # You could skip this configuration and use the AZ_OPENAI_ENDPOINT env var instead
118
+
api_version: <api_version> # The API version to use. Default is "2023_05_15"
119
+
embedding_deployment_name: <your_embedding_deployment_name> # You could skip this configuration and use the AZ_OPENAI_EMBEDDING_DEPLOYMENT_NAME env var instead
120
+
embedding_model: <openai_embeddings_to_use> # Optional model to use. Default is "text-embedding-ada-002"
121
+
llm_deployment_name: <your_model_deployment_name> # You could skip this configuration and use the AZ_OPENAI_LLM_DEPLOYMENT_NAME env var instead
122
+
llm_model: <openai_model_to_use> # Optional model to use. Default is "gpt-35-turbo"
123
+
```
124
+
125
+
And run PrivateGPT loading that profile you just created:
126
+
127
+
`PGPT_PROFILES=azopenai make run`
128
+
129
+
or
130
+
131
+
`PGPT_PROFILES=azopenai poetry run python -m private_gpt`
132
+
133
+
When the server is started it will print a log *Application startup complete*.
134
+
Navigate to http://localhost:8001 to use the Gradio UI or to http://localhost:8001/docs (API section) to try the API.
135
+
You'll notice the speed and quality of response is higher, given you are using Azure OpenAI's servers for the heavy
136
+
computations.
137
+
101
138
### Using AWS Sagemaker
102
139
103
140
For a fully private & performant setup, you can choose to have both your LLM and Embeddings model deployed using Sagemaker.
0 commit comments