Ibraaheem commited on
Commit
bf6d237
·
1 Parent(s): 51ddb70

Upload 179 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +1 -0
  2. .github/workflows/actions/install_dependencies/action.yml +30 -0
  3. .github/workflows/docker.yml +45 -0
  4. .github/workflows/fern-check.yml +21 -0
  5. .github/workflows/preview-docs.yml +48 -0
  6. .github/workflows/publish-docs.yml +26 -0
  7. .github/workflows/release-please.yml +19 -0
  8. .github/workflows/stale.yml +30 -0
  9. .github/workflows/tests.yml +67 -0
  10. docs/.nojekyll +0 -0
  11. docs/description.md +474 -0
  12. docs/index.html +22 -0
  13. docs/logo.png +0 -0
  14. docs/openapi.json +989 -0
  15. fern/README.md +39 -0
  16. fern/docs.yml +111 -0
  17. fern/docs/assets/favicon.ico +0 -0
  18. fern/docs/assets/header.jpeg +0 -0
  19. fern/docs/assets/logo_dark.png +0 -0
  20. fern/docs/assets/logo_light.png +0 -0
  21. fern/docs/assets/ui.png +0 -0
  22. fern/docs/pages/api-reference/api-reference.mdx +1 -0
  23. fern/docs/pages/api-reference/sdks.mdx +38 -0
  24. fern/docs/pages/installation/installation.mdx +235 -0
  25. fern/docs/pages/manual/ingestion-reset.mdx +14 -0
  26. fern/docs/pages/manual/ingestion.mdx +124 -0
  27. fern/docs/pages/manual/llms.mdx +83 -0
  28. fern/docs/pages/manual/settings.mdx +80 -0
  29. fern/docs/pages/manual/ui.mdx +39 -0
  30. fern/docs/pages/manual/vectordb.mdx +50 -0
  31. fern/docs/pages/overview/quickstart.mdx +21 -0
  32. fern/docs/pages/overview/welcome.mdx +53 -0
  33. fern/docs/pages/recipes/list-llm.mdx +95 -0
  34. fern/fern.config.json +4 -0
  35. fern/generators.yml +8 -0
  36. fern/openapi/openapi.json +1012 -0
  37. local_data/.gitignore +2 -0
  38. local_data/private_gpt/docstore.json +0 -0
  39. local_data/private_gpt/graph_store.json +1 -0
  40. local_data/private_gpt/index_store.json +1 -0
  41. local_data/private_gpt/qdrant/.lock +1 -0
  42. local_data/private_gpt/qdrant/collection/make_this_parameterizable_per_api_call/storage.sqlite +3 -0
  43. local_data/private_gpt/qdrant/meta.json +1 -0
  44. models/.gitignore +2 -0
  45. private_gpt/__init__.py +23 -0
  46. private_gpt/__main__.py +11 -0
  47. private_gpt/__pycache__/__init__.cpython-311.pyc +0 -0
  48. private_gpt/__pycache__/constants.cpython-311.pyc +0 -0
  49. private_gpt/__pycache__/di.cpython-311.pyc +0 -0
  50. private_gpt/__pycache__/launcher.cpython-311.pyc +0 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ local_data/private_gpt/qdrant/collection/make_this_parameterizable_per_api_call/storage.sqlite filter=lfs diff=lfs merge=lfs -text
.github/workflows/actions/install_dependencies/action.yml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: "Install Dependencies"
2
+ description: "Action to build the project dependencies from the main versions"
3
+ inputs:
4
+ python_version:
5
+ required: true
6
+ type: string
7
+ default: "3.11.4"
8
+ poetry_version:
9
+ required: true
10
+ type: string
11
+ default: "1.5.1"
12
+
13
+ runs:
14
+ using: composite
15
+ steps:
16
+ - name: Install Poetry
17
+ uses: snok/install-poetry@v1
18
+ with:
19
+ version: ${{ inputs.poetry_version }}
20
+ virtualenvs-create: true
21
+ virtualenvs-in-project: false
22
+ installer-parallel: true
23
+ - uses: actions/setup-python@v4
24
+ with:
25
+ python-version: ${{ inputs.python_version }}
26
+ cache: "poetry"
27
+ - name: Install Dependencies
28
+ run: poetry install --with ui --no-root
29
+ shell: bash
30
+
.github/workflows/docker.yml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: docker
2
+
3
+ on:
4
+ release:
5
+ types: [ published ]
6
+ workflow_dispatch:
7
+
8
+ env:
9
+ REGISTRY: ghcr.io
10
+ IMAGE_NAME: ${{ github.repository }}
11
+
12
+ jobs:
13
+ build-and-push-image:
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: read
17
+ packages: write
18
+ steps:
19
+ - name: Checkout repository
20
+ uses: actions/checkout@v4
21
+ - name: Log in to the Container registry
22
+ uses: docker/login-action@v3
23
+ with:
24
+ registry: ${{ env.REGISTRY }}
25
+ username: ${{ github.actor }}
26
+ password: ${{ secrets.GITHUB_TOKEN }}
27
+ - name: Extract metadata (tags, labels) for Docker
28
+ id: meta
29
+ uses: docker/metadata-action@v5
30
+ with:
31
+ images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
32
+ tags: |
33
+ type=ref,event=branch
34
+ type=ref,event=pr
35
+ type=semver,pattern={{version}}
36
+ type=semver,pattern={{major}}.{{minor}}
37
+ type=sha
38
+ - name: Build and push Docker image
39
+ uses: docker/build-push-action@v5
40
+ with:
41
+ context: .
42
+ file: Dockerfile.external
43
+ push: true
44
+ tags: ${{ steps.meta.outputs.tags }}
45
+ labels: ${{ steps.meta.outputs.labels }}
.github/workflows/fern-check.yml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: fern check
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - "fern/**"
9
+
10
+ jobs:
11
+ fern-check:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout repo
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Install Fern
18
+ run: npm install -g fern-api
19
+
20
+ - name: Check Fern API is valid
21
+ run: fern check
.github/workflows/preview-docs.yml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: deploy preview docs
2
+
3
+ on:
4
+ pull_request_target:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - "fern/**"
9
+
10
+ jobs:
11
+ preview-docs:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Checkout repository
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Setup Node.js
19
+ uses: actions/setup-node@v4
20
+ with:
21
+ node-version: "18"
22
+
23
+ - name: Install Fern
24
+ run: npm install -g fern-api
25
+
26
+ - name: Generate Documentation Preview with Fern
27
+ id: generate_docs
28
+ env:
29
+ FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
30
+ run: |
31
+ output=$(fern generate --docs --preview --log-level debug)
32
+ echo "$output"
33
+ # Extract the URL
34
+ preview_url=$(echo "$output" | grep -oP '(?<=Published docs to )https://[^\s]*')
35
+ # Set the output for the step
36
+ echo "::set-output name=preview_url::$preview_url"
37
+ - name: Comment PR with URL using github-actions bot
38
+ uses: actions/github-script@v4
39
+ if: ${{ steps.generate_docs.outputs.preview_url }}
40
+ with:
41
+ script: |
42
+ const preview_url = '${{ steps.generate_docs.outputs.preview_url }}';
43
+ const issue_number = context.issue.number;
44
+ github.issues.createComment({
45
+ ...context.repo,
46
+ issue_number: issue_number,
47
+ body: `Published docs preview URL: ${preview_url}`
48
+ })
.github/workflows/publish-docs.yml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: publish docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - "fern/**"
9
+
10
+ jobs:
11
+ publish-docs:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout repo
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Setup node
18
+ uses: actions/setup-node@v3
19
+
20
+ - name: Download Fern
21
+ run: npm install -g fern-api
22
+
23
+ - name: Generate and Publish Docs
24
+ env:
25
+ FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
26
+ run: fern generate --docs --log-level debug
.github/workflows/release-please.yml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: release-please
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: write
11
+
12
+ jobs:
13
+ release-please:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: google-github-actions/release-please-action@v3
17
+ with:
18
+ release-type: simple
19
+ version-file: version.txt
.github/workflows/stale.yml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
2
+ #
3
+ # You can adjust the behavior by modifying this file.
4
+ # For more information, see:
5
+ # https://github.com/actions/stale
6
+ name: Mark stale issues and pull requests
7
+
8
+ on:
9
+ schedule:
10
+ - cron: '42 5 * * *'
11
+
12
+ jobs:
13
+ stale:
14
+
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ issues: write
18
+ pull-requests: write
19
+
20
+ steps:
21
+ - uses: actions/stale@v8
22
+ with:
23
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
24
+ days-before-stale: 15
25
+ stale-issue-message: 'Stale issue'
26
+ stale-pr-message: 'Stale pull request'
27
+ stale-issue-label: 'stale'
28
+ stale-pr-label: 'stale'
29
+ exempt-issue-labels: 'autorelease: pending'
30
+ exempt-pr-labels: 'autorelease: pending'
.github/workflows/tests.yml ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref }}
11
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
12
+
13
+ jobs:
14
+ setup:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ - uses: ./.github/workflows/actions/install_dependencies
19
+
20
+ checks:
21
+ needs: setup
22
+ runs-on: ubuntu-latest
23
+ name: ${{ matrix.quality-command }}
24
+ strategy:
25
+ matrix:
26
+ quality-command:
27
+ - black
28
+ - ruff
29
+ - mypy
30
+ steps:
31
+ - uses: actions/checkout@v3
32
+ - uses: ./.github/workflows/actions/install_dependencies
33
+ - name: run ${{ matrix.quality-command }}
34
+ run: make ${{ matrix.quality-command }}
35
+
36
+ test:
37
+ needs: setup
38
+ runs-on: ubuntu-latest
39
+ name: test
40
+ steps:
41
+ - uses: actions/checkout@v3
42
+ - uses: ./.github/workflows/actions/install_dependencies
43
+ - name: run test
44
+ run: make test-coverage
45
+ # Run even if make test fails for coverage reports
46
+ # TODO: select a better xml results displayer
47
+ - name: Archive test results coverage results
48
+ uses: actions/upload-artifact@v3
49
+ if: always()
50
+ with:
51
+ name: test_results
52
+ path: tests-results.xml
53
+ - name: Archive code coverage results
54
+ uses: actions/upload-artifact@v3
55
+ if: always()
56
+ with:
57
+ name: code-coverage-report
58
+ path: htmlcov/
59
+
60
+ all_checks_passed:
61
+ # Used to easily force requirements checks in GitHub
62
+ needs:
63
+ - checks
64
+ - test
65
+ runs-on: ubuntu-latest
66
+ steps:
67
+ - run: echo "All checks passed"
docs/.nojekyll ADDED
File without changes
docs/description.md ADDED
@@ -0,0 +1,474 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Introduction
2
+
3
+ PrivateGPT provides an **API** containing all the building blocks required to build
4
+ **private, context-aware AI applications**. The API follows and extends OpenAI API standard, and supports
5
+ both normal and streaming responses.
6
+
7
+ The API is divided in two logical blocks:
8
+
9
+ - High-level API, abstracting all the complexity of a RAG (Retrieval Augmented Generation) pipeline implementation:
10
+ - Ingestion of documents: internally managing document parsing, splitting, metadata extraction,
11
+ embedding generation and storage.
12
+ - Chat & Completions using context from ingested documents: abstracting the retrieval of context, the prompt
13
+ engineering and the response generation.
14
+ - Low-level API, allowing advanced users to implement their own complex pipelines:
15
+ - Embeddings generation: based on a piece of text.
16
+ - Contextual chunks retrieval: given a query, returns the most relevant chunks of text from the ingested
17
+ documents.
18
+
19
+ > A working **Gradio UI client** is provided to test the API, together with a set of
20
+ > useful tools such as bulk model download script, ingestion script, documents folder
21
+ > watch, etc.
22
+
23
+ ## Quick Local Installation steps
24
+
25
+ The steps in `Installation and Settings` section are better explained and cover more
26
+ setup scenarios. But if you are looking for a quick setup guide, here it is:
27
+
28
+ ```
29
+ # Clone the repo
30
+ git clone https://github.com/imartinez/privateGPT
31
+ cd privateGPT
32
+
33
+ # Install Python 3.11
34
+ pyenv install 3.11
35
+ pyenv local 3.11
36
+
37
+ # Install dependencies
38
+ poetry install --with ui,local
39
+
40
+ # Download Embedding and LLM models
41
+ poetry run python scripts/setup
42
+
43
+ # (Optional) For Mac with Metal GPU, enable it. Check Installation and Settings section
44
+ to know how to enable GPU on other platforms
45
+ CMAKE_ARGS="-DLLAMA_METAL=on" pip install --force-reinstall --no-cache-dir llama-cpp-python
46
+
47
+ # Run the local server
48
+ PGPT_PROFILES=local make run
49
+
50
+ # Note: on Mac with Metal you should see a ggml_metal_add_buffer log, stating GPU is
51
+ being used
52
+
53
+ # Navigate to the UI and try it out!
54
+ http://localhost:8001/
55
+ ```
56
+
57
+ ## Installation and Settings
58
+
59
+ ### Base requirements to run PrivateGPT
60
+
61
+ * Git clone PrivateGPT repository, and navigate to it:
62
+
63
+ ```
64
+ git clone https://github.com/imartinez/privateGPT
65
+ cd privateGPT
66
+ ```
67
+
68
+ * Install Python 3.11. Ideally through a python version manager like `pyenv`.
69
+ Python 3.12
70
+ should work too. Earlier python versions are not supported.
71
+ * osx/linux: [pyenv](https://github.com/pyenv/pyenv)
72
+ * windows: [pyenv-win](https://github.com/pyenv-win/pyenv-win)
73
+
74
+ ```
75
+ pyenv install 3.11
76
+ pyenv local 3.11
77
+ ```
78
+
79
+ * Install [Poetry](https://python-poetry.org/docs/#installing-with-the-official-installer) for dependency management:
80
+
81
+ * Have a valid C++ compiler like gcc. See [Troubleshooting: C++ Compiler](#troubleshooting-c-compiler) for more details.
82
+
83
+ * Install `make` for scripts:
84
+ * osx: (Using homebrew): `brew install make`
85
+ * windows: (Using chocolatey) `choco install make`
86
+
87
+ ### Install dependencies
88
+
89
+ Install the dependencies:
90
+
91
+ ```bash
92
+ poetry install --with ui
93
+ ```
94
+
95
+ Verify everything is working by running `make run` (or `poetry run python -m private_gpt`) and navigate to
96
+ http://localhost:8001. You should see a [Gradio UI](https://gradio.app/) **configured with a mock LLM** that will
97
+ echo back the input. Later we'll see how to configure a real LLM.
98
+
99
+ ### Settings
100
+
101
+ > Note: the default settings of PrivateGPT work out-of-the-box for a 100% local setup. Skip this section if you just
102
+ > want to test PrivateGPT locally, and come back later to learn about more configuration options.
103
+
104
+ PrivateGPT is configured through *profiles* that are defined using yaml files, and selected through env variables.
105
+ The full list of properties configurable can be found in `settings.yaml`
106
+
107
+ #### env var `PGPT_SETTINGS_FOLDER`
108
+
109
+ The location of the settings folder. Defaults to the root of the project.
110
+ Should contain the default `settings.yaml` and any other `settings-{profile}.yaml`.
111
+
112
+ #### env var `PGPT_PROFILES`
113
+
114
+ By default, the profile definition in `settings.yaml` is loaded.
115
+ Using this env var you can load additional profiles; format is a comma separated list of profile names.
116
+ This will merge `settings-{profile}.yaml` on top of the base settings file.
117
+
118
+ For example:
119
+ `PGPT_PROFILES=local,cuda` will load `settings-local.yaml`
120
+ and `settings-cuda.yaml`, their contents will be merged with
121
+ later profiles properties overriding values of earlier ones like `settings.yaml`.
122
+
123
+ During testing, the `test` profile will be active along with the default, therefore `settings-test.yaml`
124
+ file is required.
125
+
126
+ #### Environment variables expansion
127
+
128
+ Configuration files can contain environment variables,
129
+ they will be expanded at runtime.
130
+
131
+ Expansion must follow the pattern `${VARIABLE_NAME:default_value}`.
132
+
133
+ For example, the following configuration will use the value of the `PORT`
134
+ environment variable or `8001` if it's not set.
135
+ Missing variables with no default will produce an error.
136
+
137
+ ```yaml
138
+ server:
139
+ port: ${PORT:8001}
140
+ ```
141
+
142
+ ### Local LLM requirements
143
+
144
+ Install extra dependencies for local execution:
145
+
146
+ ```bash
147
+ poetry install --with local
148
+ ```
149
+
150
+ For PrivateGPT to run fully locally GPU acceleration is required
151
+ (CPU execution is possible, but very slow), however,
152
+ typical Macbook laptops or window desktops with mid-range GPUs lack VRAM to run
153
+ even the smallest LLMs. For that reason
154
+ **local execution is only supported for models compatible with [llama.cpp](https://github.com/ggerganov/llama.cpp)**
155
+
156
+ These two models are known to work well:
157
+
158
+ * https://huggingface.co/TheBloke/Llama-2-7B-chat-GGUF
159
+ * https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF (recommended)
160
+
161
+ To ease the installation process, use the `setup` script that will download both
162
+ the embedding and the LLM model and place them in the correct location (under `models` folder):
163
+
164
+ ```bash
165
+ poetry run python scripts/setup
166
+ ```
167
+
168
+ If you are ok with CPU execution, you can skip the rest of this section.
169
+
170
+ As stated before, llama.cpp is required and in
171
+ particular [llama-cpp-python](https://github.com/abetlen/llama-cpp-python)
172
+ is used.
173
+
174
+ > It's highly encouraged that you fully read llama-cpp and llama-cpp-python documentation relevant to your platform.
175
+ > Running into installation issues is very likely, and you'll need to troubleshoot them yourself.
176
+
177
+ #### Customizing low level parameters
178
+
179
+ Currently not all the parameters of llama-cpp and llama-cpp-python are available at PrivateGPT's `settings.yaml` file. In case you need to customize parameters such as the number of layers loaded into the GPU, you might change these at the `llm_component.py` file under the `private_gpt/components/llm/llm_component.py`. If you are getting an out of memory error, you might also try a smaller model or stick to the proposed recommended models, instead of custom tuning the parameters.
180
+
181
+ #### OSX GPU support
182
+
183
+ You will need to build [llama.cpp](https://github.com/ggerganov/llama.cpp) with
184
+ metal support. To do that run:
185
+
186
+ ```bash
187
+ CMAKE_ARGS="-DLLAMA_METAL=on" pip install --force-reinstall --no-cache-dir llama-cpp-python
188
+ ```
189
+
190
+ #### Windows NVIDIA GPU support
191
+
192
+ Windows GPU support is done through CUDA.
193
+ Follow the instructions on the original [llama.cpp](https://github.com/ggerganov/llama.cpp) repo to install the required
194
+ dependencies.
195
+
196
+ Some tips to get it working with an NVIDIA card and CUDA (Tested on Windows 10 with CUDA 11.5 RTX 3070):
197
+
198
+ * Install latest VS2022 (and build tools) https://visualstudio.microsoft.com/vs/community/
199
+ * Install CUDA toolkit https://developer.nvidia.com/cuda-downloads
200
+ * Verify your installation is correct by running `nvcc --version` and `nvidia-smi`, ensure your CUDA version is up to
201
+ date and your GPU is detected.
202
+ * [Optional] Install CMake to troubleshoot building issues by compiling llama.cpp directly https://cmake.org/download/
203
+
204
+ If you have all required dependencies properly configured running the
205
+ following powershell command should succeed.
206
+
207
+ ```powershell
208
+ $env:CMAKE_ARGS='-DLLAMA_CUBLAS=on'; poetry run pip install --force-reinstall --no-cache-dir llama-cpp-python
209
+ ```
210
+
211
+ If your installation was correct, you should see a message similar to the following next
212
+ time you start the server `BLAS = 1`.
213
+
214
+ ```
215
+ llama_new_context_with_model: total VRAM used: 4857.93 MB (model: 4095.05 MB, context: 762.87 MB)
216
+ AVX = 1 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 0 | VSX = 0 |
217
+ ```
218
+
219
+ Note that llama.cpp offloads matrix calculations to the GPU but the performance is
220
+ still hit heavily due to latency between CPU and GPU communication. You might need to tweak
221
+ batch sizes and other parameters to get the best performance for your particular system.
222
+
223
+ #### Linux NVIDIA GPU support and Windows-WSL
224
+
225
+ Linux GPU support is done through CUDA.
226
+ Follow the instructions on the original [llama.cpp](https://github.com/ggerganov/llama.cpp) repo to install the required
227
+ external
228
+ dependencies.
229
+
230
+ Some tips:
231
+
232
+ * Make sure you have an up-to-date C++ compiler
233
+ * Install CUDA toolkit https://developer.nvidia.com/cuda-downloads
234
+ * Verify your installation is correct by running `nvcc --version` and `nvidia-smi`, ensure your CUDA version is up to
235
+ date and your GPU is detected.
236
+
237
+ After that running the following command in the repository will install llama.cpp with GPU support:
238
+
239
+ `
240
+ CMAKE_ARGS='-DLLAMA_CUBLAS=on' poetry run pip install --force-reinstall --no-cache-dir llama-cpp-python
241
+ `
242
+
243
+ If your installation was correct, you should see a message similar to the following next
244
+ time you start the server `BLAS = 1`.
245
+
246
+ ```
247
+ llama_new_context_with_model: total VRAM used: 4857.93 MB (model: 4095.05 MB, context: 762.87 MB)
248
+ AVX = 1 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 0 | VSX = 0 |
249
+ ```
250
+
251
+ #### Vectorstores
252
+ PrivateGPT supports [Chroma](https://www.trychroma.com/), [Qdrant](https://qdrant.tech/) as vectorstore providers. Chroma being the default.
253
+
254
+ To enable Qdrant, set the `vectorstore.database` property in the `settings.yaml` file to `qdrant` and install the `qdrant` extra.
255
+
256
+ ```bash
257
+ poetry install --extras qdrant
258
+ ```
259
+
260
+ By default Qdrant tries to connect to an instance at `http://localhost:3000`.
261
+
262
+ Qdrant settings can be configured by setting values to the `qdrant` property in the `settings.yaml` file.
263
+
264
+ The available configuration options are:
265
+ | Field | Description |
266
+ |--------------|-------------|
267
+ | location | If `:memory:` - use in-memory Qdrant instance.<br>If `str` - use it as a `url` parameter.|
268
+ | url | Either host or str of 'Optional[scheme], host, Optional[port], Optional[prefix]'.<br> Eg. `http://localhost:6333` |
269
+ | port | Port of the REST API interface. Default: `6333` |
270
+ | grpc_port | Port of the gRPC interface. Default: `6334` |
271
+ | prefer_grpc | If `true` - use gRPC interface whenever possible in custom methods. |
272
+ | https | If `true` - use HTTPS(SSL) protocol.|
273
+ | api_key | API key for authentication in Qdrant Cloud.|
274
+ | prefix | If set, add `prefix` to the REST URL path.<br>Example: `service/v1` will result in `http://localhost:6333/service/v1/{qdrant-endpoint}` for REST API.|
275
+ | timeout | Timeout for REST and gRPC API requests.<br>Default: 5.0 seconds for REST and unlimited for gRPC |
276
+ | host | Host name of Qdrant service. If url and host are not set, defaults to 'localhost'.|
277
+ | path | Persistence path for QdrantLocal. Eg. `local_data/private_gpt/qdrant`|
278
+ | force_disable_check_same_thread | Force disable check_same_thread for QdrantLocal sqlite connection.|
279
+
280
+ #### Known issues and Troubleshooting
281
+
282
+ Execution of LLMs locally still has a lot of sharp edges, specially when running on non Linux platforms.
283
+ You might encounter several issues:
284
+
285
+ * Performance: RAM or VRAM usage is very high, your computer might experience slowdowns or even crashes.
286
+ * GPU Virtualization on Windows and OSX: Simply not possible with docker desktop, you have to run the server directly on
287
+ the host.
288
+ * Building errors: Some of PrivateGPT dependencies need to build native code, and they might fail on some platforms.
289
+ Most likely you are missing some dev tools in your machine (updated C++ compiler, CUDA is not on PATH, etc.).
290
+ If you encounter any of these issues, please open an issue and we'll try to help.
291
+
292
+ #### Troubleshooting: C++ Compiler
293
+
294
+ If you encounter an error while building a wheel during the `pip install` process, you may need to install a C++
295
+ compiler on your computer.
296
+
297
+ **For Windows 10/11**
298
+
299
+ To install a C++ compiler on Windows 10/11, follow these steps:
300
+
301
+ 1. Install Visual Studio 2022.
302
+ 2. Make sure the following components are selected:
303
+ * Universal Windows Platform development
304
+ * C++ CMake tools for Windows
305
+ 3. Download the MinGW installer from the [MinGW website](https://sourceforge.net/projects/mingw/).
306
+ 4. Run the installer and select the `gcc` component.
307
+
308
+ ** For OSX **
309
+
310
+ 1. Check if you have a C++ compiler installed, Xcode might have done it for you. for example running `gcc`.
311
+ 2. If not, you can install clang or gcc with homebrew `brew install gcc`
312
+
313
+ #### Troubleshooting: Mac Running Intel
314
+
315
+ When running a Mac with Intel hardware (not M1), you may run into _clang: error: the clang compiler does not support '
316
+ -march=native'_ during pip install.
317
+
318
+ If so set your archflags during pip install. eg: _ARCHFLAGS="-arch x86_64" pip3 install -r requirements.txt_
319
+
320
+ ## Running the Server
321
+
322
+ After following the installation steps you should be ready to go. Here are some common run setups:
323
+
324
+ ### Running 100% locally
325
+
326
+ Make sure you have followed the *Local LLM requirements* section before moving on.
327
+
328
+ This command will start PrivateGPT using the `settings.yaml` (default profile) together with the `settings-local.yaml`
329
+ configuration files. By default, it will enable both the API and the Gradio UI. Run:
330
+
331
+ ```
332
+ PGPT_PROFILES=local make run
333
+ ```
334
+
335
+ or
336
+
337
+ ```
338
+ PGPT_PROFILES=local poetry run python -m private_gpt
339
+ ```
340
+
341
+ When the server is started it will print a log *Application startup complete*.
342
+ Navigate to http://localhost:8001 to use the Gradio UI or to http://localhost:8001/docs (API section) to try the API
343
+ using Swagger UI.
344
+
345
+ ### Local server using OpenAI as LLM
346
+
347
+ If you cannot run a local model (because you don't have a GPU, for example) or for testing purposes, you may
348
+ decide to run PrivateGPT using OpenAI as the LLM.
349
+
350
+ In order to do so, create a profile `settings-openai.yaml` with the following contents:
351
+
352
+ ```yaml
353
+ llm:
354
+ mode: openai
355
+
356
+ openai:
357
+ api_key: <your_openai_api_key> # You could skip this configuration and use the OPENAI_API_KEY env var instead
358
+ ```
359
+
360
+ And run PrivateGPT loading that profile you just created:
361
+
362
+ ```PGPT_PROFILES=openai make run```
363
+
364
+ or
365
+
366
+ ```PGPT_PROFILES=openai poetry run python -m private_gpt```
367
+
368
+ > Note this will still use the local Embeddings model, as it is ok to use it on a CPU.
369
+ > We'll support using OpenAI embeddings in a future release.
370
+
371
+ When the server is started it will print a log *Application startup complete*.
372
+ Navigate to http://localhost:8001 to use the Gradio UI or to http://localhost:8001/docs (API section) to try the API.
373
+ You'll notice the speed and quality of response is higher, given you are using OpenAI's servers for the heavy
374
+ computations.
375
+
376
+ ### Use AWS's Sagemaker
377
+
378
+ 🚧 Under construction 🚧
379
+
380
+ ## Gradio UI user manual
381
+
382
+ Gradio UI is a ready to use way of testing most of PrivateGPT API functionalities.
383
+
384
+ ![Gradio PrivateGPT](https://lh3.googleusercontent.com/drive-viewer/AK7aPaD_Hc-A8A9ooMe-hPgm_eImgsbxAjb__8nFYj8b_WwzvL1Gy90oAnp1DfhPaN6yGiEHCOXs0r77W1bYHtPzlVwbV7fMsA=s1600)
385
+
386
+ ### Execution Modes
387
+
388
+ It has 3 modes of execution (you can select in the top-left):
389
+
390
+ * Query Docs: uses the context from the
391
+ ingested documents to answer the questions posted in the chat. It also takes
392
+ into account previous chat messages as context.
393
+ * Makes use of `/chat/completions` API with `use_context=true` and no
394
+ `context_filter`.
395
+ * Search in Docs: fast search that returns the 4 most related text
396
+ chunks, together with their source document and page.
397
+ * Makes use of `/chunks` API with no `context_filter`, `limit=4` and
398
+ `prev_next_chunks=0`.
399
+ * LLM Chat: simple, non-contextual chat with the LLM. The ingested documents won't
400
+ be taken into account, only the previous messages.
401
+ * Makes use of `/chat/completions` API with `use_context=false`.
402
+
403
+ ### Document Ingestion
404
+
405
+ Ingest documents by using the `Upload a File` button. You can check the progress of
406
+ the ingestion in the console logs of the server.
407
+
408
+ The list of ingested files is shown below the button.
409
+
410
+ If you want to delete the ingested documents, refer to *Reset Local documents
411
+ database* section in the documentation.
412
+
413
+ ### Chat
414
+
415
+ Normal chat interface, self-explanatory ;)
416
+
417
+ You can check the actual prompt being passed to the LLM by looking at the logs of
418
+ the server. We'll add better observability in future releases.
419
+
420
+ ## Deployment options
421
+
422
+ 🚧 We are working on Dockerized deployment guidelines 🚧
423
+
424
+ ## Observability
425
+
426
+ Basic logs are enabled using LlamaIndex
427
+ basic logging (for example ingestion progress or LLM prompts and answers).
428
+
429
+ 🚧 We are working on improved Observability. 🚧
430
+
431
+ ## Ingesting & Managing Documents
432
+
433
+ 🚧 Document Update and Delete are still WIP. 🚧
434
+
435
+ The ingestion of documents can be done in different ways:
436
+
437
+ * Using the `/ingest` API
438
+ * Using the Gradio UI
439
+ * Using the Bulk Local Ingestion functionality (check next section)
440
+
441
+ ### Bulk Local Ingestion
442
+
443
+ When you are running PrivateGPT in a fully local setup, you can ingest a complete folder for convenience (containing
444
+ pdf, text files, etc.)
445
+ and optionally watch changes on it with the command:
446
+
447
+ ```bash
448
+ make ingest /path/to/folder -- --watch
449
+ ```
450
+
451
+ To log the processed and failed files to an additional file, use:
452
+
453
+ ```bash
454
+ make ingest /path/to/folder -- --watch --log-file /path/to/log/file.log
455
+ ```
456
+
457
+ After ingestion is complete, you should be able to chat with your documents
458
+ by navigating to http://localhost:8001 and using the option `Query documents`,
459
+ or using the completions / chat API.
460
+
461
+ ### Reset Local documents database
462
+
463
+ When running in a local setup, you can remove all ingested documents by simply
464
+ deleting all contents of `local_data` folder (except .gitignore).
465
+
466
+ To simplify this process, you can use the command:
467
+ ```bash
468
+ make wipe
469
+ ```
470
+
471
+ ## API
472
+
473
+ As explained in the introduction, the API contains high level APIs (ingestion and chat/completions) and low level APIs
474
+ (embeddings and chunk retrieval). In this section the different specific API calls are explained.
docs/index.html ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>PrivateGPT Docs</title>
6
+ <!-- needed for adaptive design -->
7
+ <meta name="viewport" content="width=device-width, initial-scale=1">
8
+ <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
9
+ <link rel="shortcut icon" href="https://fastapi.tiangolo.com/img/favicon.png">
10
+ <!-- ReDoc doesn't change outer page styles -->
11
+ <style>
12
+ body {
13
+ margin: 0;
14
+ padding: 0;
15
+ }
16
+ </style>
17
+ </head>
18
+ <body>
19
+ <noscript> ReDoc requires Javascript to function. Please enable it to browse the documentation. </noscript>
20
+ <redoc spec-url="/openapi.json"></redoc>
21
+ <script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"></script>
22
+ </body>
docs/logo.png ADDED
docs/openapi.json ADDED
@@ -0,0 +1,989 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "PrivateGPT",
5
+ "summary": "PrivateGPT is a production-ready AI project that allows you to ask questions to your documents using the power of Large Language Models (LLMs), even in scenarios without Internet connection. 100% private, no data leaves your execution environment at any point.",
6
+ "description": "## Introduction\n\nPrivateGPT provides an **API** containing all the building blocks required to build\n**private, context-aware AI applications**. The API follows and extends OpenAI API standard, and supports\nboth normal and streaming responses.\n\nThe API is divided in two logical blocks:\n\n- High-level API, abstracting all the complexity of a RAG (Retrieval Augmented Generation) pipeline implementation:\n - Ingestion of documents: internally managing document parsing, splitting, metadata extraction,\n embedding generation and storage.\n - Chat & Completions using context from ingested documents: abstracting the retrieval of context, the prompt\n engineering and the response generation.\n- Low-level API, allowing advanced users to implement their own complex pipelines:\n - Embeddings generation: based on a piece of text.\n - Contextual chunks retrieval: given a query, returns the most relevant chunks of text from the ingested\n documents.\n\n> A working **Gradio UI client** is provided to test the API, together with a set of\n> useful tools such as bulk model download script, ingestion script, documents folder\n> watch, etc.\n\n## Quick Local Installation steps\n\nThe steps in `Installation and Settings` section are better explained and cover more\nsetup scenarios. But if you are looking for a quick setup guide, here it is:\n\n```\n# Clone the repo\ngit clone https://github.com/imartinez/privateGPT\ncd privateGPT\n\n# Install Python 3.11\npyenv install 3.11\npyenv local 3.11\n\n# Install dependencies\npoetry install --with ui,local\n\n# Download Embedding and LLM models\npoetry run python scripts/setup\n\n# (Optional) For Mac with Metal GPU, enable it. Check Installation and Settings section \nto know how to enable GPU on other platforms\nCMAKE_ARGS=\"-DLLAMA_METAL=on\" pip install --force-reinstall --no-cache-dir llama-cpp-python\n\n# Run the local server \nPGPT_PROFILES=local make run\n\n# Note: on Mac with Metal you should see a ggml_metal_add_buffer log, stating GPU is \nbeing used\n\n# Navigate to the UI and try it out! \nhttp://localhost:8001/\n```\n\n## Installation and Settings\n\n### Base requirements to run PrivateGPT\n\n* Git clone PrivateGPT repository, and navigate to it:\n\n```\n git clone https://github.com/imartinez/privateGPT\n cd privateGPT\n```\n\n* Install Python 3.11. Ideally through a python version manager like `pyenv`.\n Python 3.12\n should work too. Earlier python versions are not supported.\n * osx/linux: [pyenv](https://github.com/pyenv/pyenv)\n * windows: [pyenv-win](https://github.com/pyenv-win/pyenv-win)\n\n``` \npyenv install 3.11\npyenv local 3.11\n```\n\n* Install [Poetry](https://python-poetry.org/docs/#installing-with-the-official-installer) for dependency management:\n\n* Have a valid C++ compiler like gcc. See [Troubleshooting: C++ Compiler](#troubleshooting-c-compiler) for more details.\n\n* Install `make` for scripts:\n * osx: (Using homebrew): `brew install make`\n * windows: (Using chocolatey) `choco install make`\n\n### Install dependencies\n\nInstall the dependencies:\n\n```bash\npoetry install --with ui\n```\n\nVerify everything is working by running `make run` (or `poetry run python -m private_gpt`) and navigate to\nhttp://localhost:8001. You should see a [Gradio UI](https://gradio.app/) **configured with a mock LLM** that will\necho back the input. Later we'll see how to configure a real LLM.\n\n### Settings\n\n> Note: the default settings of PrivateGPT work out-of-the-box for a 100% local setup. Skip this section if you just\n> want to test PrivateGPT locally, and come back later to learn about more configuration options.\n\nPrivateGPT is configured through *profiles* that are defined using yaml files, and selected through env variables.\nThe full list of properties configurable can be found in `settings.yaml`\n\n#### env var `PGPT_SETTINGS_FOLDER`\n\nThe location of the settings folder. Defaults to the root of the project.\nShould contain the default `settings.yaml` and any other `settings-{profile}.yaml`.\n\n#### env var `PGPT_PROFILES`\n\nBy default, the profile definition in `settings.yaml` is loaded.\nUsing this env var you can load additional profiles; format is a comma separated list of profile names.\nThis will merge `settings-{profile}.yaml` on top of the base settings file.\n\nFor example:\n`PGPT_PROFILES=local,cuda` will load `settings-local.yaml`\nand `settings-cuda.yaml`, their contents will be merged with\nlater profiles properties overriding values of earlier ones like `settings.yaml`.\n\nDuring testing, the `test` profile will be active along with the default, therefore `settings-test.yaml`\nfile is required.\n\n#### Environment variables expansion\n\nConfiguration files can contain environment variables,\nthey will be expanded at runtime.\n\nExpansion must follow the pattern `${VARIABLE_NAME:default_value}`.\n\nFor example, the following configuration will use the value of the `PORT`\nenvironment variable or `8001` if it's not set.\nMissing variables with no default will produce an error.\n\n```yaml\nserver:\n port: ${PORT:8001}\n```\n\n### Local LLM requirements\n\nInstall extra dependencies for local execution:\n\n```bash\npoetry install --with local\n```\n\nFor PrivateGPT to run fully locally GPU acceleration is required\n(CPU execution is possible, but very slow), however,\ntypical Macbook laptops or window desktops with mid-range GPUs lack VRAM to run\neven the smallest LLMs. For that reason\n**local execution is only supported for models compatible with [llama.cpp](https://github.com/ggerganov/llama.cpp)**\n\nThese two models are known to work well:\n\n* https://huggingface.co/TheBloke/Llama-2-7B-chat-GGUF\n* https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF (recommended)\n\nTo ease the installation process, use the `setup` script that will download both\nthe embedding and the LLM model and place them in the correct location (under `models` folder):\n\n```bash\npoetry run python scripts/setup\n```\n\nIf you are ok with CPU execution, you can skip the rest of this section.\n\nAs stated before, llama.cpp is required and in\nparticular [llama-cpp-python](https://github.com/abetlen/llama-cpp-python)\nis used.\n\n> It's highly encouraged that you fully read llama-cpp and llama-cpp-python documentation relevant to your platform.\n> Running into installation issues is very likely, and you'll need to troubleshoot them yourself.\n\n#### Customizing low level parameters\n\nCurrently not all the parameters of llama-cpp and llama-cpp-python are available at PrivateGPT's `settings.yaml` file. In case you need to customize parameters such as the number of layers loaded into the GPU, you might change these at the `llm_component.py` file under the `private_gpt/components/llm/llm_component.py`. If you are getting an out of memory error, you might also try a smaller model or stick to the proposed recommended models, instead of custom tuning the parameters.\n\n#### OSX GPU support\n\nYou will need to build [llama.cpp](https://github.com/ggerganov/llama.cpp) with\nmetal support. To do that run:\n\n```bash\nCMAKE_ARGS=\"-DLLAMA_METAL=on\" pip install --force-reinstall --no-cache-dir llama-cpp-python\n```\n\n#### Windows NVIDIA GPU support\n\nWindows GPU support is done through CUDA.\nFollow the instructions on the original [llama.cpp](https://github.com/ggerganov/llama.cpp) repo to install the required\ndependencies.\n\nSome tips to get it working with an NVIDIA card and CUDA (Tested on Windows 10 with CUDA 11.5 RTX 3070):\n\n* Install latest VS2022 (and build tools) https://visualstudio.microsoft.com/vs/community/\n* Install CUDA toolkit https://developer.nvidia.com/cuda-downloads\n* Verify your installation is correct by running `nvcc --version` and `nvidia-smi`, ensure your CUDA version is up to\n date and your GPU is detected.\n* [Optional] Install CMake to troubleshoot building issues by compiling llama.cpp directly https://cmake.org/download/\n\nIf you have all required dependencies properly configured running the\nfollowing powershell command should succeed.\n\n```powershell\n$env:CMAKE_ARGS='-DLLAMA_CUBLAS=on'; poetry run pip install --force-reinstall --no-cache-dir llama-cpp-python\n```\n\nIf your installation was correct, you should see a message similar to the following next\ntime you start the server `BLAS = 1`.\n\n```\nllama_new_context_with_model: total VRAM used: 4857.93 MB (model: 4095.05 MB, context: 762.87 MB)\nAVX = 1 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 0 | VSX = 0 | \n```\n\nNote that llama.cpp offloads matrix calculations to the GPU but the performance is\nstill hit heavily due to latency between CPU and GPU communication. You might need to tweak\nbatch sizes and other parameters to get the best performance for your particular system.\n\n#### Linux NVIDIA GPU support and Windows-WSL\n\nLinux GPU support is done through CUDA.\nFollow the instructions on the original [llama.cpp](https://github.com/ggerganov/llama.cpp) repo to install the required\nexternal\ndependencies.\n\nSome tips:\n\n* Make sure you have an up-to-date C++ compiler\n* Install CUDA toolkit https://developer.nvidia.com/cuda-downloads\n* Verify your installation is correct by running `nvcc --version` and `nvidia-smi`, ensure your CUDA version is up to\n date and your GPU is detected.\n\nAfter that running the following command in the repository will install llama.cpp with GPU support:\n\n`\nCMAKE_ARGS='-DLLAMA_CUBLAS=on' poetry run pip install --force-reinstall --no-cache-dir llama-cpp-python\n`\n\nIf your installation was correct, you should see a message similar to the following next\ntime you start the server `BLAS = 1`.\n\n```\nllama_new_context_with_model: total VRAM used: 4857.93 MB (model: 4095.05 MB, context: 762.87 MB)\nAVX = 1 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 0 | VSX = 0 | \n```\n\n#### Vectorstores\nPrivateGPT supports [Chroma](https://www.trychroma.com/), [Qdrant](https://qdrant.tech/) as vectorstore providers. Chroma being the default.\n\nTo enable Qdrant, set the `vectorstore.database` property in the `settings.yaml` file to `qdrant` and install the `qdrant` extra.\n\n```bash\npoetry install --extras qdrant\n```\n\nBy default Qdrant tries to connect to an instance at `http://localhost:3000`.\n\nQdrant settings can be configured by setting values to the `qdrant` propery in the `settings.yaml` file.\n\nThe available configuration options are:\n| Field | Description |\n|--------------|-------------|\n| location | If `:memory:` - use in-memory Qdrant instance.<br>If `str` - use it as a `url` parameter.|\n| url | Either host or str of 'Optional[scheme], host, Optional[port], Optional[prefix]'.<br> Eg. `http://localhost:6333` |\n| port | Port of the REST API interface. Default: `6333` |\n| grpc_port | Port of the gRPC interface. Default: `6334` |\n| prefer_grpc | If `true` - use gRPC interface whenever possible in custom methods. |\n| https | If `true` - use HTTPS(SSL) protocol.|\n| api_key | API key for authentication in Qdrant Cloud.|\n| prefix | If set, add `prefix` to the REST URL path.<br>Example: `service/v1` will result in `http://localhost:6333/service/v1/{qdrant-endpoint}` for REST API.|\n| timeout | Timeout for REST and gRPC API requests.<br>Default: 5.0 seconds for REST and unlimited for gRPC |\n| host | Host name of Qdrant service. If url and host are not set, defaults to 'localhost'.|\n| path | Persistence path for QdrantLocal. Eg. `local_data/private_gpt/qdrant`|\n| force_disable_check_same_thread | Force disable check_same_thread for QdrantLocal sqlite connection.|\n\n#### Known issues and Troubleshooting\n\nExecution of LLMs locally still has a lot of sharp edges, specially when running on non Linux platforms.\nYou might encounter several issues:\n\n* Performance: RAM or VRAM usage is very high, your computer might experience slowdowns or even crashes.\n* GPU Virtualization on Windows and OSX: Simply not possible with docker desktop, you have to run the server directly on\n the host.\n* Building errors: Some of PrivateGPT dependencies need to build native code, and they might fail on some platforms.\n Most likely you are missing some dev tools in your machine (updated C++ compiler, CUDA is not on PATH, etc.).\n If you encounter any of these issues, please open an issue and we'll try to help.\n\n#### Troubleshooting: C++ Compiler\n\nIf you encounter an error while building a wheel during the `pip install` process, you may need to install a C++\ncompiler on your computer.\n\n**For Windows 10/11**\n\nTo install a C++ compiler on Windows 10/11, follow these steps:\n\n1. Install Visual Studio 2022.\n2. Make sure the following components are selected:\n * Universal Windows Platform development\n * C++ CMake tools for Windows\n3. Download the MinGW installer from the [MinGW website](https://sourceforge.net/projects/mingw/).\n4. Run the installer and select the `gcc` component.\n\n** For OSX **\n\n1. Check if you have a C++ compiler installed, Xcode might have done it for you. for example running `gcc`.\n2. If not, you can install clang or gcc with homebrew `brew install gcc`\n\n#### Troubleshooting: Mac Running Intel\n\nWhen running a Mac with Intel hardware (not M1), you may run into _clang: error: the clang compiler does not support '\n-march=native'_ during pip install.\n\nIf so set your archflags during pip install. eg: _ARCHFLAGS=\"-arch x86_64\" pip3 install -r requirements.txt_\n\n## Running the Server\n\nAfter following the installation steps you should be ready to go. Here are some common run setups:\n\n### Running 100% locally\n\nMake sure you have followed the *Local LLM requirements* section before moving on.\n\nThis command will start PrivateGPT using the `settings.yaml` (default profile) together with the `settings-local.yaml`\nconfiguration files. By default, it will enable both the API and the Gradio UI. Run:\n\n```\nPGPT_PROFILES=local make run\n``` \n\nor\n\n```\nPGPT_PROFILES=local poetry run python -m private_gpt\n```\n\nWhen the server is started it will print a log *Application startup complete*.\nNavigate to http://localhost:8001 to use the Gradio UI or to http://localhost:8001/docs (API section) to try the API\nusing Swagger UI.\n\n### Local server using OpenAI as LLM\n\nIf you cannot run a local model (because you don't have a GPU, for example) or for testing purposes, you may\ndecide to run PrivateGPT using OpenAI as the LLM.\n\nIn order to do so, create a profile `settings-openai.yaml` with the following contents:\n\n```yaml\nllm:\n mode: openai\n\nopenai:\n api_key: <your_openai_api_key> # You could skip this configuration and use the OPENAI_API_KEY env var instead\n```\n\nAnd run PrivateGPT loading that profile you just created:\n\n```PGPT_PROFILES=openai make run```\n\nor\n\n```PGPT_PROFILES=openai poetry run python -m private_gpt```\n\n> Note this will still use the local Embeddings model, as it is ok to use it on a CPU.\n> We'll support using OpenAI embeddings in a future release.\n\nWhen the server is started it will print a log *Application startup complete*.\nNavigate to http://localhost:8001 to use the Gradio UI or to http://localhost:8001/docs (API section) to try the API.\nYou'll notice the speed and quality of response is higher, given you are using OpenAI's servers for the heavy\ncomputations.\n\n### Use AWS's Sagemaker\n\n\ud83d\udea7 Under construction \ud83d\udea7\n\n## Gradio UI user manual\n\nGradio UI is a ready to use way of testing most of PrivateGPT API functionalities.\n\n![Gradio PrivateGPT](https://lh3.googleusercontent.com/drive-viewer/AK7aPaD_Hc-A8A9ooMe-hPgm_eImgsbxAjb__8nFYj8b_WwzvL1Gy90oAnp1DfhPaN6yGiEHCOXs0r77W1bYHtPzlVwbV7fMsA=s1600)\n\n### Execution Modes\n\nIt has 3 modes of execution (you can select in the top-left):\n\n* Query Docs: uses the context from the\n ingested documents to answer the questions posted in the chat. It also takes\n into account previous chat messages as context.\n * Makes use of `/chat/completions` API with `use_context=true` and no\n `context_filter`.\n* Search in Docs: fast search that returns the 4 most related text\n chunks, together with their source document and page.\n * Makes use of `/chunks` API with no `context_filter`, `limit=4` and\n `prev_next_chunks=0`.\n* LLM Chat: simple, non-contextual chat with the LLM. The ingested documents won't\n be taken into account, only the previous messages.\n * Makes use of `/chat/completions` API with `use_context=false`.\n\n### Document Ingestion\n\nIngest documents by using the `Upload a File` button. You can check the progress of\nthe ingestion in the console logs of the server.\n\nThe list of ingested files is shown below the button.\n\nIf you want to delete the ingested documents, refer to *Reset Local documents\ndatabase* section in the documentation.\n\n### Chat\n\nNormal chat interface, self-explanatory ;)\n\nYou can check the actual prompt being passed to the LLM by looking at the logs of\nthe server. We'll add better observability in future releases.\n\n## Deployment options\n\n\ud83d\udea7 We are working on Dockerized deployment guidelines \ud83d\udea7\n\n## Observability\n\nBasic logs are enabled using LlamaIndex\nbasic logging (for example ingestion progress or LLM prompts and answers).\n\n\ud83d\udea7 We are working on improved Observability. \ud83d\udea7\n\n## Ingesting & Managing Documents\n\n\ud83d\udea7 Document Update and Delete are still WIP. \ud83d\udea7\n\nThe ingestion of documents can be done in different ways:\n\n* Using the `/ingest` API\n* Using the Gradio UI\n* Using the Bulk Local Ingestion functionality (check next section)\n\n### Bulk Local Ingestion\n\nWhen you are running PrivateGPT in a fully local setup, you can ingest a complete folder for convenience (containing\npdf, text files, etc.)\nand optionally watch changes on it with the command:\n\n```bash\nmake ingest /path/to/folder -- --watch\n```\n\nTo log the processed and failed files to an additional file, use:\n\n```bash\nmake ingest /path/to/folder -- --watch --log-file /path/to/log/file.log\n```\n\nAfter ingestion is complete, you should be able to chat with your documents\nby navigating to http://localhost:8001 and using the option `Query documents`,\nor using the completions / chat API.\n\n### Reset Local documents database\n\nWhen running in a local setup, you can remove all ingested documents by simply\ndeleting all contents of `local_data` folder (except .gitignore).\n\n## API\n\nAs explained in the introduction, the API contains high level APIs (ingestion and chat/completions) and low level APIs\n(embeddings and chunk retrieval). In this section the different specific API calls are explained.\n",
7
+ "contact": {
8
+ "url": "https://github.com/imartinez/privateGPT"
9
+ },
10
+ "license": {
11
+ "name": "Apache 2.0",
12
+ "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
13
+ },
14
+ "version": "0.1.0",
15
+ "x-logo": {
16
+ "url": "https://lh3.googleusercontent.com/drive-viewer/AK7aPaD_iNlMoTquOBsw4boh4tIYxyEuhz6EtEs8nzq3yNkNAK00xGjE1KUCmPJSk3TYOjcs6tReG6w_cLu1S7L_gPgT9z52iw=s2560"
17
+ }
18
+ },
19
+ "paths": {
20
+ "/v1/completions": {
21
+ "post": {
22
+ "tags": [
23
+ "Contextual Completions"
24
+ ],
25
+ "summary": "Completion",
26
+ "description": "We recommend most users use our Chat completions API.\n\nGiven a prompt, the model will return one predicted completion. If `use_context`\nis set to `true`, the model will use context coming from the ingested documents\nto create the response. The documents being used can be filtered using the\n`context_filter` and passing the document IDs to be used. Ingested documents IDs\ncan be found using `/ingest/list` endpoint. If you want all ingested documents to\nbe used, remove `context_filter` altogether.\n\nWhen using `'include_sources': true`, the API will return the source Chunks used\nto create the response, which come from the context provided.\n\nWhen using `'stream': true`, the API will return data chunks following [OpenAI's\nstreaming model](https://platform.openai.com/docs/api-reference/chat/streaming):\n```\n{\"id\":\"12345\",\"object\":\"completion.chunk\",\"created\":1694268190,\n\"model\":\"private-gpt\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\n\"finish_reason\":null}]}\n```",
27
+ "operationId": "prompt_completion_v1_completions_post",
28
+ "requestBody": {
29
+ "content": {
30
+ "application/json": {
31
+ "schema": {
32
+ "$ref": "#/components/schemas/CompletionsBody"
33
+ }
34
+ }
35
+ },
36
+ "required": true
37
+ },
38
+ "responses": {
39
+ "200": {
40
+ "description": "Successful Response",
41
+ "content": {
42
+ "application/json": {
43
+ "schema": {
44
+ "$ref": "#/components/schemas/OpenAICompletion"
45
+ }
46
+ }
47
+ }
48
+ },
49
+ "422": {
50
+ "description": "Validation Error",
51
+ "content": {
52
+ "application/json": {
53
+ "schema": {
54
+ "$ref": "#/components/schemas/HTTPValidationError"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ },
62
+ "/v1/chat/completions": {
63
+ "post": {
64
+ "tags": [
65
+ "Contextual Completions"
66
+ ],
67
+ "summary": "Chat Completion",
68
+ "description": "Given a list of messages comprising a conversation, return a response.\n\nIf `use_context` is set to `true`, the model will use context coming\nfrom the ingested documents to create the response. The documents being used can\nbe filtered using the `context_filter` and passing the document IDs to be used.\nIngested documents IDs can be found using `/ingest/list` endpoint. If you want\nall ingested documents to be used, remove `context_filter` altogether.\n\nWhen using `'include_sources': true`, the API will return the source Chunks used\nto create the response, which come from the context provided.\n\nWhen using `'stream': true`, the API will return data chunks following [OpenAI's\nstreaming model](https://platform.openai.com/docs/api-reference/chat/streaming):\n```\n{\"id\":\"12345\",\"object\":\"completion.chunk\",\"created\":1694268190,\n\"model\":\"private-gpt\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\n\"finish_reason\":null}]}\n```",
69
+ "operationId": "chat_completion_v1_chat_completions_post",
70
+ "requestBody": {
71
+ "content": {
72
+ "application/json": {
73
+ "schema": {
74
+ "$ref": "#/components/schemas/ChatBody"
75
+ }
76
+ }
77
+ },
78
+ "required": true
79
+ },
80
+ "responses": {
81
+ "200": {
82
+ "description": "Successful Response",
83
+ "content": {
84
+ "application/json": {
85
+ "schema": {
86
+ "$ref": "#/components/schemas/OpenAICompletion"
87
+ }
88
+ }
89
+ }
90
+ },
91
+ "422": {
92
+ "description": "Validation Error",
93
+ "content": {
94
+ "application/json": {
95
+ "schema": {
96
+ "$ref": "#/components/schemas/HTTPValidationError"
97
+ }
98
+ }
99
+ }
100
+ }
101
+ }
102
+ }
103
+ },
104
+ "/v1/chunks": {
105
+ "post": {
106
+ "tags": [
107
+ "Context Chunks"
108
+ ],
109
+ "summary": "Chunks Retrieval",
110
+ "description": "Given a `text`, returns the most relevant chunks from the ingested documents.\n\nThe returned information can be used to generate prompts that can be\npassed to `/completions` or `/chat/completions` APIs. Note: it is usually a very\nfast API, because only the Embeddings model is involved, not the LLM. The\nreturned information contains the relevant chunk `text` together with the source\n`document` it is coming from. It also contains a score that can be used to\ncompare different results.\n\nThe max number of chunks to be returned is set using the `limit` param.\n\nPrevious and next chunks (pieces of text that appear right before or after in the\ndocument) can be fetched by using the `prev_next_chunks` field.\n\nThe documents being used can be filtered using the `context_filter` and passing\nthe document IDs to be used. Ingested documents IDs can be found using\n`/ingest/list` endpoint. If you want all ingested documents to be used,\nremove `context_filter` altogether.",
111
+ "operationId": "chunks_retrieval_v1_chunks_post",
112
+ "requestBody": {
113
+ "content": {
114
+ "application/json": {
115
+ "schema": {
116
+ "$ref": "#/components/schemas/ChunksBody"
117
+ }
118
+ }
119
+ },
120
+ "required": true
121
+ },
122
+ "responses": {
123
+ "200": {
124
+ "description": "Successful Response",
125
+ "content": {
126
+ "application/json": {
127
+ "schema": {
128
+ "$ref": "#/components/schemas/ChunksResponse"
129
+ }
130
+ }
131
+ }
132
+ },
133
+ "422": {
134
+ "description": "Validation Error",
135
+ "content": {
136
+ "application/json": {
137
+ "schema": {
138
+ "$ref": "#/components/schemas/HTTPValidationError"
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+ },
146
+ "/v1/ingest": {
147
+ "post": {
148
+ "tags": [
149
+ "Ingestion"
150
+ ],
151
+ "summary": "Ingest",
152
+ "description": "Ingests and processes a file, storing its chunks to be used as context.\n\nThe context obtained from files is later used in\n`/chat/completions`, `/completions`, and `/chunks` APIs.\n\nMost common document\nformats are supported, but you may be prompted to install an extra dependency to\nmanage a specific file type.\n\nA file can generate different Documents (for example a PDF generates one Document\nper page). All Documents IDs are returned in the response, together with the\nextracted Metadata (which is later used to improve context retrieval). Those IDs\ncan be used to filter the context used to create responses in\n`/chat/completions`, `/completions`, and `/chunks` APIs.",
153
+ "operationId": "ingest_v1_ingest_post",
154
+ "requestBody": {
155
+ "content": {
156
+ "multipart/form-data": {
157
+ "schema": {
158
+ "$ref": "#/components/schemas/Body_ingest_v1_ingest_post"
159
+ }
160
+ }
161
+ },
162
+ "required": true
163
+ },
164
+ "responses": {
165
+ "200": {
166
+ "description": "Successful Response",
167
+ "content": {
168
+ "application/json": {
169
+ "schema": {
170
+ "$ref": "#/components/schemas/IngestResponse"
171
+ }
172
+ }
173
+ }
174
+ },
175
+ "422": {
176
+ "description": "Validation Error",
177
+ "content": {
178
+ "application/json": {
179
+ "schema": {
180
+ "$ref": "#/components/schemas/HTTPValidationError"
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ },
188
+ "/v1/ingest/list": {
189
+ "get": {
190
+ "tags": [
191
+ "Ingestion"
192
+ ],
193
+ "summary": "List Ingested",
194
+ "description": "Lists already ingested Documents including their Document ID and metadata.\n\nThose IDs can be used to filter the context used to create responses\nin `/chat/completions`, `/completions`, and `/chunks` APIs.",
195
+ "operationId": "list_ingested_v1_ingest_list_get",
196
+ "responses": {
197
+ "200": {
198
+ "description": "Successful Response",
199
+ "content": {
200
+ "application/json": {
201
+ "schema": {
202
+ "$ref": "#/components/schemas/IngestResponse"
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
208
+ }
209
+ },
210
+ "/v1/ingest/{doc_id}": {
211
+ "delete": {
212
+ "tags": [
213
+ "Ingestion"
214
+ ],
215
+ "summary": "Delete Ingested",
216
+ "description": "Delete the specified ingested Document.\n\nThe `doc_id` can be obtained from the `GET /ingest/list` endpoint.\nThe document will be effectively deleted from your storage context.",
217
+ "operationId": "delete_ingested_v1_ingest__doc_id__delete",
218
+ "parameters": [
219
+ {
220
+ "name": "doc_id",
221
+ "in": "path",
222
+ "required": true,
223
+ "schema": {
224
+ "type": "string",
225
+ "title": "Doc Id"
226
+ }
227
+ }
228
+ ],
229
+ "responses": {
230
+ "200": {
231
+ "description": "Successful Response",
232
+ "content": {
233
+ "application/json": {
234
+ "schema": {}
235
+ }
236
+ }
237
+ },
238
+ "422": {
239
+ "description": "Validation Error",
240
+ "content": {
241
+ "application/json": {
242
+ "schema": {
243
+ "$ref": "#/components/schemas/HTTPValidationError"
244
+ }
245
+ }
246
+ }
247
+ }
248
+ }
249
+ }
250
+ },
251
+ "/v1/embeddings": {
252
+ "post": {
253
+ "tags": [
254
+ "Embeddings"
255
+ ],
256
+ "summary": "Embeddings Generation",
257
+ "description": "Get a vector representation of a given input.\n\nThat vector representation can be easily consumed\nby machine learning models and algorithms.",
258
+ "operationId": "embeddings_generation_v1_embeddings_post",
259
+ "requestBody": {
260
+ "content": {
261
+ "application/json": {
262
+ "schema": {
263
+ "$ref": "#/components/schemas/EmbeddingsBody"
264
+ }
265
+ }
266
+ },
267
+ "required": true
268
+ },
269
+ "responses": {
270
+ "200": {
271
+ "description": "Successful Response",
272
+ "content": {
273
+ "application/json": {
274
+ "schema": {
275
+ "$ref": "#/components/schemas/EmbeddingsResponse"
276
+ }
277
+ }
278
+ }
279
+ },
280
+ "422": {
281
+ "description": "Validation Error",
282
+ "content": {
283
+ "application/json": {
284
+ "schema": {
285
+ "$ref": "#/components/schemas/HTTPValidationError"
286
+ }
287
+ }
288
+ }
289
+ }
290
+ }
291
+ }
292
+ },
293
+ "/health": {
294
+ "get": {
295
+ "tags": [
296
+ "Health"
297
+ ],
298
+ "summary": "Health",
299
+ "description": "Return ok if the system is up.",
300
+ "operationId": "health_health_get",
301
+ "responses": {
302
+ "200": {
303
+ "description": "Successful Response",
304
+ "content": {
305
+ "application/json": {
306
+ "schema": {
307
+ "$ref": "#/components/schemas/HealthResponse"
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
313
+ }
314
+ }
315
+ },
316
+ "components": {
317
+ "schemas": {
318
+ "Body_ingest_v1_ingest_post": {
319
+ "properties": {
320
+ "file": {
321
+ "type": "string",
322
+ "format": "binary",
323
+ "title": "File"
324
+ }
325
+ },
326
+ "type": "object",
327
+ "required": [
328
+ "file"
329
+ ],
330
+ "title": "Body_ingest_v1_ingest_post"
331
+ },
332
+ "ChatBody": {
333
+ "properties": {
334
+ "messages": {
335
+ "items": {
336
+ "$ref": "#/components/schemas/OpenAIMessage"
337
+ },
338
+ "type": "array",
339
+ "title": "Messages"
340
+ },
341
+ "use_context": {
342
+ "type": "boolean",
343
+ "title": "Use Context",
344
+ "default": false
345
+ },
346
+ "context_filter": {
347
+ "anyOf": [
348
+ {
349
+ "$ref": "#/components/schemas/ContextFilter"
350
+ },
351
+ {
352
+ "type": "null"
353
+ }
354
+ ]
355
+ },
356
+ "include_sources": {
357
+ "type": "boolean",
358
+ "title": "Include Sources",
359
+ "default": true
360
+ },
361
+ "stream": {
362
+ "type": "boolean",
363
+ "title": "Stream",
364
+ "default": false
365
+ }
366
+ },
367
+ "type": "object",
368
+ "required": [
369
+ "messages"
370
+ ],
371
+ "title": "ChatBody",
372
+ "examples": [
373
+ {
374
+ "context_filter": {
375
+ "docs_ids": [
376
+ "c202d5e6-7b69-4869-81cc-dd574ee8ee11"
377
+ ]
378
+ },
379
+ "include_sources": true,
380
+ "messages": [
381
+ {
382
+ "content": "How do you fry an egg?",
383
+ "role": "user"
384
+ }
385
+ ],
386
+ "stream": false,
387
+ "use_context": true
388
+ }
389
+ ]
390
+ },
391
+ "Chunk": {
392
+ "properties": {
393
+ "object": {
394
+ "const": "context.chunk",
395
+ "title": "Object"
396
+ },
397
+ "score": {
398
+ "type": "number",
399
+ "title": "Score",
400
+ "examples": [
401
+ 0.023
402
+ ]
403
+ },
404
+ "document": {
405
+ "$ref": "#/components/schemas/IngestedDoc"
406
+ },
407
+ "text": {
408
+ "type": "string",
409
+ "title": "Text",
410
+ "examples": [
411
+ "Outbound sales increased 20%, driven by new leads."
412
+ ]
413
+ },
414
+ "previous_texts": {
415
+ "anyOf": [
416
+ {
417
+ "items": {
418
+ "type": "string"
419
+ },
420
+ "type": "array"
421
+ },
422
+ {
423
+ "type": "null"
424
+ }
425
+ ],
426
+ "title": "Previous Texts",
427
+ "examples": [
428
+ [
429
+ "SALES REPORT 2023",
430
+ "Inbound didn't show major changes."
431
+ ]
432
+ ]
433
+ },
434
+ "next_texts": {
435
+ "anyOf": [
436
+ {
437
+ "items": {
438
+ "type": "string"
439
+ },
440
+ "type": "array"
441
+ },
442
+ {
443
+ "type": "null"
444
+ }
445
+ ],
446
+ "title": "Next Texts",
447
+ "examples": [
448
+ [
449
+ "New leads came from Google Ads campaign.",
450
+ "The campaign was run by the Marketing Department"
451
+ ]
452
+ ]
453
+ }
454
+ },
455
+ "type": "object",
456
+ "required": [
457
+ "object",
458
+ "score",
459
+ "document",
460
+ "text"
461
+ ],
462
+ "title": "Chunk"
463
+ },
464
+ "ChunksBody": {
465
+ "properties": {
466
+ "text": {
467
+ "type": "string",
468
+ "title": "Text",
469
+ "examples": [
470
+ "Q3 2023 sales"
471
+ ]
472
+ },
473
+ "context_filter": {
474
+ "anyOf": [
475
+ {
476
+ "$ref": "#/components/schemas/ContextFilter"
477
+ },
478
+ {
479
+ "type": "null"
480
+ }
481
+ ]
482
+ },
483
+ "limit": {
484
+ "type": "integer",
485
+ "title": "Limit",
486
+ "default": 10
487
+ },
488
+ "prev_next_chunks": {
489
+ "type": "integer",
490
+ "title": "Prev Next Chunks",
491
+ "default": 0,
492
+ "examples": [
493
+ 2
494
+ ]
495
+ }
496
+ },
497
+ "type": "object",
498
+ "required": [
499
+ "text"
500
+ ],
501
+ "title": "ChunksBody"
502
+ },
503
+ "ChunksResponse": {
504
+ "properties": {
505
+ "object": {
506
+ "const": "list",
507
+ "title": "Object"
508
+ },
509
+ "model": {
510
+ "const": "private-gpt",
511
+ "title": "Model"
512
+ },
513
+ "data": {
514
+ "items": {
515
+ "$ref": "#/components/schemas/Chunk"
516
+ },
517
+ "type": "array",
518
+ "title": "Data"
519
+ }
520
+ },
521
+ "type": "object",
522
+ "required": [
523
+ "object",
524
+ "model",
525
+ "data"
526
+ ],
527
+ "title": "ChunksResponse"
528
+ },
529
+ "CompletionsBody": {
530
+ "properties": {
531
+ "prompt": {
532
+ "type": "string",
533
+ "title": "Prompt"
534
+ },
535
+ "use_context": {
536
+ "type": "boolean",
537
+ "title": "Use Context",
538
+ "default": false
539
+ },
540
+ "context_filter": {
541
+ "anyOf": [
542
+ {
543
+ "$ref": "#/components/schemas/ContextFilter"
544
+ },
545
+ {
546
+ "type": "null"
547
+ }
548
+ ]
549
+ },
550
+ "include_sources": {
551
+ "type": "boolean",
552
+ "title": "Include Sources",
553
+ "default": true
554
+ },
555
+ "stream": {
556
+ "type": "boolean",
557
+ "title": "Stream",
558
+ "default": false
559
+ }
560
+ },
561
+ "type": "object",
562
+ "required": [
563
+ "prompt"
564
+ ],
565
+ "title": "CompletionsBody",
566
+ "examples": [
567
+ {
568
+ "include_sources": false,
569
+ "prompt": "How do you fry an egg?",
570
+ "stream": false,
571
+ "use_context": false
572
+ }
573
+ ]
574
+ },
575
+ "ContextFilter": {
576
+ "properties": {
577
+ "docs_ids": {
578
+ "anyOf": [
579
+ {
580
+ "items": {
581
+ "type": "string"
582
+ },
583
+ "type": "array"
584
+ },
585
+ {
586
+ "type": "null"
587
+ }
588
+ ],
589
+ "title": "Docs Ids",
590
+ "examples": [
591
+ [
592
+ "c202d5e6-7b69-4869-81cc-dd574ee8ee11"
593
+ ]
594
+ ]
595
+ }
596
+ },
597
+ "type": "object",
598
+ "required": [
599
+ "docs_ids"
600
+ ],
601
+ "title": "ContextFilter"
602
+ },
603
+ "Embedding": {
604
+ "properties": {
605
+ "index": {
606
+ "type": "integer",
607
+ "title": "Index"
608
+ },
609
+ "object": {
610
+ "const": "embedding",
611
+ "title": "Object"
612
+ },
613
+ "embedding": {
614
+ "items": {
615
+ "type": "number"
616
+ },
617
+ "type": "array",
618
+ "title": "Embedding",
619
+ "examples": [
620
+ [
621
+ 0.0023064255,
622
+ -0.009327292
623
+ ]
624
+ ]
625
+ }
626
+ },
627
+ "type": "object",
628
+ "required": [
629
+ "index",
630
+ "object",
631
+ "embedding"
632
+ ],
633
+ "title": "Embedding"
634
+ },
635
+ "EmbeddingsBody": {
636
+ "properties": {
637
+ "input": {
638
+ "anyOf": [
639
+ {
640
+ "type": "string"
641
+ },
642
+ {
643
+ "items": {
644
+ "type": "string"
645
+ },
646
+ "type": "array"
647
+ }
648
+ ],
649
+ "title": "Input"
650
+ }
651
+ },
652
+ "type": "object",
653
+ "required": [
654
+ "input"
655
+ ],
656
+ "title": "EmbeddingsBody"
657
+ },
658
+ "EmbeddingsResponse": {
659
+ "properties": {
660
+ "object": {
661
+ "const": "list",
662
+ "title": "Object"
663
+ },
664
+ "model": {
665
+ "const": "private-gpt",
666
+ "title": "Model"
667
+ },
668
+ "data": {
669
+ "items": {
670
+ "$ref": "#/components/schemas/Embedding"
671
+ },
672
+ "type": "array",
673
+ "title": "Data"
674
+ }
675
+ },
676
+ "type": "object",
677
+ "required": [
678
+ "object",
679
+ "model",
680
+ "data"
681
+ ],
682
+ "title": "EmbeddingsResponse"
683
+ },
684
+ "HTTPValidationError": {
685
+ "properties": {
686
+ "detail": {
687
+ "items": {
688
+ "$ref": "#/components/schemas/ValidationError"
689
+ },
690
+ "type": "array",
691
+ "title": "Detail"
692
+ }
693
+ },
694
+ "type": "object",
695
+ "title": "HTTPValidationError"
696
+ },
697
+ "HealthResponse": {
698
+ "properties": {
699
+ "status": {
700
+ "const": "ok",
701
+ "title": "Status",
702
+ "default": "ok"
703
+ }
704
+ },
705
+ "type": "object",
706
+ "title": "HealthResponse"
707
+ },
708
+ "IngestResponse": {
709
+ "properties": {
710
+ "object": {
711
+ "const": "list",
712
+ "title": "Object"
713
+ },
714
+ "model": {
715
+ "const": "private-gpt",
716
+ "title": "Model"
717
+ },
718
+ "data": {
719
+ "items": {
720
+ "$ref": "#/components/schemas/IngestedDoc"
721
+ },
722
+ "type": "array",
723
+ "title": "Data"
724
+ }
725
+ },
726
+ "type": "object",
727
+ "required": [
728
+ "object",
729
+ "model",
730
+ "data"
731
+ ],
732
+ "title": "IngestResponse"
733
+ },
734
+ "IngestedDoc": {
735
+ "properties": {
736
+ "object": {
737
+ "const": "ingest.document",
738
+ "title": "Object"
739
+ },
740
+ "doc_id": {
741
+ "type": "string",
742
+ "title": "Doc Id",
743
+ "examples": [
744
+ "c202d5e6-7b69-4869-81cc-dd574ee8ee11"
745
+ ]
746
+ },
747
+ "doc_metadata": {
748
+ "anyOf": [
749
+ {
750
+ "type": "object"
751
+ },
752
+ {
753
+ "type": "null"
754
+ }
755
+ ],
756
+ "title": "Doc Metadata",
757
+ "examples": [
758
+ {
759
+ "file_name": "Sales Report Q3 2023.pdf",
760
+ "page_label": "2"
761
+ }
762
+ ]
763
+ }
764
+ },
765
+ "type": "object",
766
+ "required": [
767
+ "object",
768
+ "doc_id",
769
+ "doc_metadata"
770
+ ],
771
+ "title": "IngestedDoc"
772
+ },
773
+ "OpenAIChoice": {
774
+ "properties": {
775
+ "finish_reason": {
776
+ "anyOf": [
777
+ {
778
+ "type": "string"
779
+ },
780
+ {
781
+ "type": "null"
782
+ }
783
+ ],
784
+ "title": "Finish Reason",
785
+ "examples": [
786
+ "stop"
787
+ ]
788
+ },
789
+ "delta": {
790
+ "anyOf": [
791
+ {
792
+ "$ref": "#/components/schemas/OpenAIDelta"
793
+ },
794
+ {
795
+ "type": "null"
796
+ }
797
+ ]
798
+ },
799
+ "message": {
800
+ "anyOf": [
801
+ {
802
+ "$ref": "#/components/schemas/OpenAIMessage"
803
+ },
804
+ {
805
+ "type": "null"
806
+ }
807
+ ]
808
+ },
809
+ "sources": {
810
+ "anyOf": [
811
+ {
812
+ "items": {
813
+ "$ref": "#/components/schemas/Chunk"
814
+ },
815
+ "type": "array"
816
+ },
817
+ {
818
+ "type": "null"
819
+ }
820
+ ],
821
+ "title": "Sources"
822
+ },
823
+ "index": {
824
+ "type": "integer",
825
+ "title": "Index",
826
+ "default": 0
827
+ }
828
+ },
829
+ "type": "object",
830
+ "required": [
831
+ "finish_reason"
832
+ ],
833
+ "title": "OpenAIChoice",
834
+ "description": "Response from AI.\n\nEither the delta or the message will be present, but never both.\nSources used will be returned in case context retrieval was enabled."
835
+ },
836
+ "OpenAICompletion": {
837
+ "properties": {
838
+ "id": {
839
+ "type": "string",
840
+ "title": "Id"
841
+ },
842
+ "object": {
843
+ "type": "string",
844
+ "enum": [
845
+ "completion",
846
+ "completion.chunk"
847
+ ],
848
+ "title": "Object",
849
+ "default": "completion"
850
+ },
851
+ "created": {
852
+ "type": "integer",
853
+ "title": "Created",
854
+ "examples": [
855
+ 1623340000
856
+ ]
857
+ },
858
+ "model": {
859
+ "const": "private-gpt",
860
+ "title": "Model"
861
+ },
862
+ "choices": {
863
+ "items": {
864
+ "$ref": "#/components/schemas/OpenAIChoice"
865
+ },
866
+ "type": "array",
867
+ "title": "Choices"
868
+ }
869
+ },
870
+ "type": "object",
871
+ "required": [
872
+ "id",
873
+ "created",
874
+ "model",
875
+ "choices"
876
+ ],
877
+ "title": "OpenAICompletion",
878
+ "description": "Clone of OpenAI Completion model.\n\nFor more information see: https://platform.openai.com/docs/api-reference/chat/object"
879
+ },
880
+ "OpenAIDelta": {
881
+ "properties": {
882
+ "content": {
883
+ "anyOf": [
884
+ {
885
+ "type": "string"
886
+ },
887
+ {
888
+ "type": "null"
889
+ }
890
+ ],
891
+ "title": "Content"
892
+ }
893
+ },
894
+ "type": "object",
895
+ "required": [
896
+ "content"
897
+ ],
898
+ "title": "OpenAIDelta",
899
+ "description": "A piece of completion that needs to be concatenated to get the full message."
900
+ },
901
+ "OpenAIMessage": {
902
+ "properties": {
903
+ "role": {
904
+ "type": "string",
905
+ "enum": [
906
+ "assistant",
907
+ "system",
908
+ "user"
909
+ ],
910
+ "title": "Role",
911
+ "default": "user"
912
+ },
913
+ "content": {
914
+ "anyOf": [
915
+ {
916
+ "type": "string"
917
+ },
918
+ {
919
+ "type": "null"
920
+ }
921
+ ],
922
+ "title": "Content"
923
+ }
924
+ },
925
+ "type": "object",
926
+ "required": [
927
+ "content"
928
+ ],
929
+ "title": "OpenAIMessage",
930
+ "description": "Inference result, with the source of the message.\n\nRole could be the assistant or system\n(providing a default response, not AI generated)."
931
+ },
932
+ "ValidationError": {
933
+ "properties": {
934
+ "loc": {
935
+ "items": {
936
+ "anyOf": [
937
+ {
938
+ "type": "string"
939
+ },
940
+ {
941
+ "type": "integer"
942
+ }
943
+ ]
944
+ },
945
+ "type": "array",
946
+ "title": "Location"
947
+ },
948
+ "msg": {
949
+ "type": "string",
950
+ "title": "Message"
951
+ },
952
+ "type": {
953
+ "type": "string",
954
+ "title": "Error Type"
955
+ }
956
+ },
957
+ "type": "object",
958
+ "required": [
959
+ "loc",
960
+ "msg",
961
+ "type"
962
+ ],
963
+ "title": "ValidationError"
964
+ }
965
+ }
966
+ },
967
+ "tags": [
968
+ {
969
+ "name": "Ingestion",
970
+ "description": "High-level APIs covering document ingestion -internally managing document parsing, splitting,metadata extraction, embedding generation and storage- and ingested documents CRUD.Each ingested document is identified by an ID that can be used to filter the contextused in *Contextual Completions* and *Context Chunks* APIs."
971
+ },
972
+ {
973
+ "name": "Contextual Completions",
974
+ "description": "High-level APIs covering contextual Chat and Completions. They follow OpenAI's format, extending it to allow using the context coming from ingested documents to create the response. Internallymanage context retrieval, prompt engineering and the response generation."
975
+ },
976
+ {
977
+ "name": "Context Chunks",
978
+ "description": "Low-level API that given a query return relevant chunks of text coming from the ingesteddocuments."
979
+ },
980
+ {
981
+ "name": "Embeddings",
982
+ "description": "Low-level API to obtain the vector representation of a given text, using an Embeddings model.Follows OpenAI's embeddings API format."
983
+ },
984
+ {
985
+ "name": "Health",
986
+ "description": "Simple health API to make sure the server is up and running."
987
+ }
988
+ ]
989
+ }
fern/README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Documentation of privateGPT
2
+
3
+ The documentation of this project is being rendered thanks to [fern](https://github.com/fern-api/fern).
4
+
5
+ Fern is basically transforming your `.md` and `.mdx` files into a static website: your documentation.
6
+
7
+ The configuration of your documentation is done in the `./docs.yml` file.
8
+ There, you can configure the navbar, tabs, sections and pages being rendered.
9
+
10
+ The documentation of fern (and the syntax of its configuration `docs.yml`) is
11
+ available there [docs.buildwithfern.com](https://docs.buildwithfern.com/).
12
+
13
+ ## How to run fern
14
+
15
+ **You cannot render your documentation locally without fern credentials.**
16
+
17
+ To see how your documentation looks like, you **have to** use the CICD of this
18
+ repository (by opening a PR, CICD job will be executed, and a preview of
19
+ your PR's documentation will be deployed in vercel automatically, through fern).
20
+
21
+ The only thing you can do locally, is to run `fern check`, which check the syntax of
22
+ your `docs.yml` file.
23
+
24
+ ## How to add a new page
25
+ Add in the `docs.yml` a new `page`, with the following syntax:
26
+
27
+ ```yml
28
+ navigation:
29
+ # ...
30
+ - tab: my-existing-tab
31
+ layout:
32
+ # ...
33
+ - section: My Existing Section
34
+ contents:
35
+ # ...
36
+ - page: My new page display name
37
+ # The path of the page, relative to `fern/`
38
+ path: ./docs/pages/my-existing-tab/new-page-content.mdx
39
+ ```
fern/docs.yml ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Main Fern configuration file
2
+ instances:
3
+ - url: privategpt.docs.buildwithfern.com
4
+ custom-domain: docs.privategpt.dev
5
+
6
+ title: PrivateGPT | Docs
7
+
8
+ # The tabs definition, in the top left corner
9
+ tabs:
10
+ overview:
11
+ display-name: Overview
12
+ icon: "fa-solid fa-home"
13
+ installation:
14
+ display-name: Installation
15
+ icon: "fa-solid fa-download"
16
+ manual:
17
+ display-name: Manual
18
+ icon: "fa-solid fa-book"
19
+ recipes:
20
+ display-name: Recipes
21
+ icon: "fa-solid fa-flask"
22
+ api-reference:
23
+ display-name: API Reference
24
+ icon: "fa-solid fa-file-contract"
25
+
26
+ # Definition of tabs contents, will be displayed on the left side of the page, below all tabs
27
+ navigation:
28
+ # The default tab
29
+ - tab: overview
30
+ layout:
31
+ - section: Welcome
32
+ contents:
33
+ - page: Welcome
34
+ path: ./docs/pages/overview/welcome.mdx
35
+ - page: Quickstart
36
+ path: ./docs/pages/overview/quickstart.mdx
37
+ # How to install privateGPT, with FAQ and troubleshooting
38
+ - tab: installation
39
+ layout:
40
+ - section: Getting started
41
+ contents:
42
+ - page: Installation
43
+ path: ./docs/pages/installation/installation.mdx
44
+ # Manual of privateGPT: how to use it and configure it
45
+ - tab: manual
46
+ layout:
47
+ - section: General configuration
48
+ contents:
49
+ - page: Configuration
50
+ path: ./docs/pages/manual/settings.mdx
51
+ - section: Document management
52
+ contents:
53
+ - page: Ingestion
54
+ path: ./docs/pages/manual/ingestion.mdx
55
+ - page: Deletion
56
+ path: ./docs/pages/manual/ingestion-reset.mdx
57
+ - section: Storage
58
+ contents:
59
+ - page: Vector Stores
60
+ path: ./docs/pages/manual/vectordb.mdx
61
+ - section: Advanced Setup
62
+ contents:
63
+ - page: LLM Backends
64
+ path: ./docs/pages/manual/llms.mdx
65
+ - section: User Interface
66
+ contents:
67
+ - page: User interface (Gradio) Manual
68
+ path: ./docs/pages/manual/ui.mdx
69
+ # Small code snippet or example of usage to help users
70
+ - tab: recipes
71
+ layout:
72
+ - section: Choice of LLM
73
+ contents:
74
+ # TODO: add recipes
75
+ - page: List of LLMs
76
+ path: ./docs/pages/recipes/list-llm.mdx
77
+ # More advanced usage of privateGPT, by API
78
+ - tab: api-reference
79
+ layout:
80
+ - section: Overview
81
+ contents:
82
+ - page : API Reference overview
83
+ path: ./docs/pages/api-reference/api-reference.mdx
84
+ - page: SDKs
85
+ path: ./docs/pages/api-reference/sdks.mdx
86
+ - api: API Reference
87
+
88
+ # Definition of the navbar, will be displayed in the top right corner.
89
+ # `type:primary` is always displayed at the most right side of the navbar
90
+ navbar-links:
91
+ - type: secondary
92
+ text: Github
93
+ url: "https://github.com/imartinez/privateGPT"
94
+ - type: secondary
95
+ text: Contact us
96
+ url: "mailto:[email protected]"
97
+ - type: primary
98
+ text: Join the Discord
99
+ url: https://discord.com/invite/bK6mRVpErU
100
+
101
+ colors:
102
+ accentPrimary:
103
+ dark: "#C6BBFF"
104
+ light: "#756E98"
105
+
106
+ logo:
107
+ dark: ./docs/assets/logo_light.png
108
+ light: ./docs/assets/logo_dark.png
109
+ height: 50
110
+
111
+ favicon: ./docs/assets/favicon.ico
fern/docs/assets/favicon.ico ADDED
fern/docs/assets/header.jpeg ADDED
fern/docs/assets/logo_dark.png ADDED
fern/docs/assets/logo_light.png ADDED
fern/docs/assets/ui.png ADDED
fern/docs/pages/api-reference/api-reference.mdx ADDED
@@ -0,0 +1 @@
 
 
1
+ # API Reference
fern/docs/pages/api-reference/sdks.mdx ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ We use [Fern](www.buildwithfern.com) to offer API clients for Node.js, Python, Go, and Java.
2
+ We recommend using these clients to interact with our endpoints.
3
+ The clients are kept up to date automatically, so we encourage you to use the latest version.
4
+
5
+ ## SDKs
6
+
7
+ *Coming soon!*
8
+
9
+ <Cards>
10
+ <Card
11
+ title="Node.js/TypeScript"
12
+ icon="fa-brands fa-node"
13
+ href="https://github.com/imartinez/privateGPT-typescript"
14
+ />
15
+ <Card
16
+ title="Python"
17
+ icon="fa-brands fa-python"
18
+ href="https://github.com/imartinez/privateGPT-python"
19
+ />
20
+ <br />
21
+ </Cards>
22
+
23
+ <br />
24
+
25
+ <Cards>
26
+ <Card
27
+ title="Java"
28
+ icon="fa-brands fa-java"
29
+ href="https://github.com/imartinez/privateGPT-java"
30
+ />
31
+ <Card
32
+ title="Go"
33
+ icon="fa-brands fa-golang"
34
+ href="https://github.com/imartinez/privateGPT-go"
35
+ />
36
+ </Cards>
37
+
38
+ <br />
fern/docs/pages/installation/installation.mdx ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Installation and Settings
2
+
3
+ ### Base requirements to run PrivateGPT
4
+
5
+ * Git clone PrivateGPT repository, and navigate to it:
6
+
7
+ ```bash
8
+ git clone https://github.com/imartinez/privateGPT
9
+ cd privateGPT
10
+ ```
11
+
12
+ * Install Python `3.11` (*if you do not have it already*). Ideally through a python version manager like `pyenv`.
13
+ Python 3.12 should work too. Earlier python versions are not supported.
14
+ * osx/linux: [pyenv](https://github.com/pyenv/pyenv)
15
+ * windows: [pyenv-win](https://github.com/pyenv-win/pyenv-win)
16
+
17
+ ```bash
18
+ pyenv install 3.11
19
+ pyenv local 3.11
20
+ ```
21
+
22
+ * Install [Poetry](https://python-poetry.org/docs/#installing-with-the-official-installer) for dependency management:
23
+
24
+ * Have a valid C++ compiler like gcc. See [Troubleshooting: C++ Compiler](#troubleshooting-c-compiler) for more details.
25
+
26
+ * Install `make` for scripts:
27
+ * osx: (Using homebrew): `brew install make`
28
+ * windows: (Using chocolatey) `choco install make`
29
+
30
+ ### Install dependencies
31
+
32
+ Install the dependencies:
33
+
34
+ ```bash
35
+ poetry install --with ui
36
+ ```
37
+
38
+ Verify everything is working by running `make run` (or `poetry run python -m private_gpt`) and navigate to
39
+ http://localhost:8001. You should see a [Gradio UI](https://gradio.app/) **configured with a mock LLM** that will
40
+ echo back the input. Below we'll see how to configure a real LLM.
41
+
42
+ ### Settings
43
+
44
+ <Callout intent="info">
45
+ The default settings of PrivateGPT should work out-of-the-box for a 100% local setup. **However**, as is, it runs exclusively on your CPU.
46
+ Skip this section if you just want to test PrivateGPT locally, and come back later to learn about more configuration options (and have better performances).
47
+ </Callout>
48
+
49
+ <br />
50
+
51
+ ### Local LLM requirements
52
+
53
+ Install extra dependencies for local execution:
54
+
55
+ ```bash
56
+ poetry install --with local
57
+ ```
58
+
59
+ For PrivateGPT to run fully locally GPU acceleration is required
60
+ (CPU execution is possible, but very slow), however,
61
+ typical Macbook laptops or window desktops with mid-range GPUs lack VRAM to run
62
+ even the smallest LLMs. For that reason
63
+ **local execution is only supported for models compatible with [llama.cpp](https://github.com/ggerganov/llama.cpp)**
64
+
65
+ These two models are known to work well:
66
+
67
+ * https://huggingface.co/TheBloke/Llama-2-7B-chat-GGUF
68
+ * https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF (recommended)
69
+
70
+ To ease the installation process, use the `setup` script that will download both
71
+ the embedding and the LLM model and place them in the correct location (under `models` folder):
72
+
73
+ ```bash
74
+ poetry run python scripts/setup
75
+ ```
76
+
77
+ If you are ok with CPU execution, you can skip the rest of this section.
78
+
79
+ As stated before, llama.cpp is required and in
80
+ particular [llama-cpp-python](https://github.com/abetlen/llama-cpp-python)
81
+ is used.
82
+
83
+ > It's highly encouraged that you fully read llama-cpp and llama-cpp-python documentation relevant to your platform.
84
+ > Running into installation issues is very likely, and you'll need to troubleshoot them yourself.
85
+
86
+ #### Customizing low level parameters
87
+
88
+ Currently, not all the parameters of `llama.cpp` and `llama-cpp-python` are available at PrivateGPT's `settings.yaml` file.
89
+ In case you need to customize parameters such as the number of layers loaded into the GPU, you might change
90
+ these at the `llm_component.py` file under the `private_gpt/components/llm/llm_component.py`.
91
+
92
+ ##### Available LLM config options
93
+
94
+ The `llm` section of the settings allows for the following configurations:
95
+
96
+ - `mode`: how to run your llm
97
+ - `max_new_tokens`: this lets you configure the number of new tokens the LLM will generate and add to the context window (by default Llama.cpp uses `256`)
98
+
99
+ Example:
100
+
101
+ ```yaml
102
+ llm:
103
+ mode: local
104
+ max_new_tokens: 256
105
+ ```
106
+
107
+ If you are getting an out of memory error, you might also try a smaller model or stick to the proposed
108
+ recommended models, instead of custom tuning the parameters.
109
+
110
+ #### OSX GPU support
111
+
112
+ You will need to build [llama.cpp](https://github.com/ggerganov/llama.cpp) with metal support.
113
+
114
+ To do that, you need to install `llama.cpp` python's binding `llama-cpp-python` through pip, with the compilation flag
115
+ that activate `METAL`: you have to pass `-DLLAMA_METAL=on` to the CMake command tha `pip` runs for you (see below).
116
+
117
+ In other words, one should simply run:
118
+ ```bash
119
+ CMAKE_ARGS="-DLLAMA_METAL=on" pip install --force-reinstall --no-cache-dir llama-cpp-python
120
+ ```
121
+
122
+ The above command will force the re-installation of `llama-cpp-python` with `METAL` support by compiling
123
+ `llama.cpp` locally with your `METAL` libraries (shipped by default with your macOS).
124
+
125
+ More information is available in the documentation of the libraries themselves:
126
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#installation-with-hardware-acceleration)
127
+ * [llama-cpp-python's documentation](https://llama-cpp-python.readthedocs.io/en/latest/#installation-with-hardware-acceleration)
128
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp#build)
129
+
130
+ #### Windows NVIDIA GPU support
131
+
132
+ Windows GPU support is done through CUDA.
133
+ Follow the instructions on the original [llama.cpp](https://github.com/ggerganov/llama.cpp) repo to install the required
134
+ dependencies.
135
+
136
+ Some tips to get it working with an NVIDIA card and CUDA (Tested on Windows 10 with CUDA 11.5 RTX 3070):
137
+
138
+ * Install latest VS2022 (and build tools) https://visualstudio.microsoft.com/vs/community/
139
+ * Install CUDA toolkit https://developer.nvidia.com/cuda-downloads
140
+ * Verify your installation is correct by running `nvcc --version` and `nvidia-smi`, ensure your CUDA version is up to
141
+ date and your GPU is detected.
142
+ * [Optional] Install CMake to troubleshoot building issues by compiling llama.cpp directly https://cmake.org/download/
143
+
144
+ If you have all required dependencies properly configured running the
145
+ following powershell command should succeed.
146
+
147
+ ```powershell
148
+ $env:CMAKE_ARGS='-DLLAMA_CUBLAS=on'; poetry run pip install --force-reinstall --no-cache-dir llama-cpp-python
149
+ ```
150
+
151
+ If your installation was correct, you should see a message similar to the following next
152
+ time you start the server `BLAS = 1`.
153
+
154
+ ```console
155
+ llama_new_context_with_model: total VRAM used: 4857.93 MB (model: 4095.05 MB, context: 762.87 MB)
156
+ AVX = 1 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 0 | VSX = 0 |
157
+ ```
158
+
159
+ Note that llama.cpp offloads matrix calculations to the GPU but the performance is
160
+ still hit heavily due to latency between CPU and GPU communication. You might need to tweak
161
+ batch sizes and other parameters to get the best performance for your particular system.
162
+
163
+ #### Linux NVIDIA GPU support and Windows-WSL
164
+
165
+ Linux GPU support is done through CUDA.
166
+ Follow the instructions on the original [llama.cpp](https://github.com/ggerganov/llama.cpp) repo to install the required
167
+ external
168
+ dependencies.
169
+
170
+ Some tips:
171
+
172
+ * Make sure you have an up-to-date C++ compiler
173
+ * Install CUDA toolkit https://developer.nvidia.com/cuda-downloads
174
+ * Verify your installation is correct by running `nvcc --version` and `nvidia-smi`, ensure your CUDA version is up to
175
+ date and your GPU is detected.
176
+
177
+ After that running the following command in the repository will install llama.cpp with GPU support:
178
+
179
+ ```bash
180
+ CMAKE_ARGS='-DLLAMA_CUBLAS=on' poetry run pip install --force-reinstall --no-cache-dir llama-cpp-python
181
+ ```
182
+
183
+ If your installation was correct, you should see a message similar to the following next
184
+ time you start the server `BLAS = 1`.
185
+
186
+ ```
187
+ llama_new_context_with_model: total VRAM used: 4857.93 MB (model: 4095.05 MB, context: 762.87 MB)
188
+ AVX = 1 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 0 | VSX = 0 |
189
+ ```
190
+
191
+ ### Known issues and Troubleshooting
192
+
193
+ Execution of LLMs locally still has a lot of sharp edges, specially when running on non Linux platforms.
194
+ You might encounter several issues:
195
+
196
+ * Performance: RAM or VRAM usage is very high, your computer might experience slowdowns or even crashes.
197
+ * GPU Virtualization on Windows and OSX: Simply not possible with docker desktop, you have to run the server directly on
198
+ the host.
199
+ * Building errors: Some of PrivateGPT dependencies need to build native code, and they might fail on some platforms.
200
+ Most likely you are missing some dev tools in your machine (updated C++ compiler, CUDA is not on PATH, etc.).
201
+ If you encounter any of these issues, please open an issue and we'll try to help.
202
+
203
+ One of the first reflex to adopt is: get more information.
204
+ If, during your installation, something does not go as planned, retry in *verbose* mode, and see what goes wrong.
205
+
206
+ For example, when installing packages with `pip install`, you can add the option `-vvv` to show the details of the installation.
207
+
208
+ #### Troubleshooting: C++ Compiler
209
+
210
+ If you encounter an error while building a wheel during the `pip install` process, you may need to install a C++
211
+ compiler on your computer.
212
+
213
+ **For Windows 10/11**
214
+
215
+ To install a C++ compiler on Windows 10/11, follow these steps:
216
+
217
+ 1. Install Visual Studio 2022.
218
+ 2. Make sure the following components are selected:
219
+ * Universal Windows Platform development
220
+ * C++ CMake tools for Windows
221
+ 3. Download the MinGW installer from the [MinGW website](https://sourceforge.net/projects/mingw/).
222
+ 4. Run the installer and select the `gcc` component.
223
+
224
+ **For OSX**
225
+
226
+ 1. Check if you have a C++ compiler installed, `Xcode` should have done it for you. To install Xcode, go to the App
227
+ Store and search for Xcode and install it. **Or** you can install the command line tools by running `xcode-select --install`.
228
+ 2. If not, you can install clang or gcc with homebrew `brew install gcc`
229
+
230
+ #### Troubleshooting: Mac Running Intel
231
+
232
+ When running a Mac with Intel hardware (not M1), you may run into _clang: error: the clang compiler does not support '
233
+ -march=native'_ during pip install.
234
+
235
+ If so set your archflags during pip install. eg: _ARCHFLAGS="-arch x86_64" pip3 install -r requirements.txt_
fern/docs/pages/manual/ingestion-reset.mdx ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Reset Local documents database
2
+
3
+ When running in a local setup, you can remove all ingested documents by simply
4
+ deleting all contents of `local_data` folder (except .gitignore).
5
+
6
+ To simplify this process, you can use the command:
7
+ ```bash
8
+ make wipe
9
+ ```
10
+
11
+ # Advanced usage
12
+
13
+ You can actually delete your documents from your storage by using the
14
+ API endpoint `DELETE` in the Ingestion API.
fern/docs/pages/manual/ingestion.mdx ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ingesting & Managing Documents
2
+
3
+ The ingestion of documents can be done in different ways:
4
+
5
+ * Using the `/ingest` API
6
+ * Using the Gradio UI
7
+ * Using the Bulk Local Ingestion functionality (check next section)
8
+
9
+ ## Bulk Local Ingestion
10
+
11
+ When you are running PrivateGPT in a fully local setup, you can ingest a complete folder for convenience (containing
12
+ pdf, text files, etc.)
13
+ and optionally watch changes on it with the command:
14
+
15
+ ```bash
16
+ make ingest /path/to/folder -- --watch
17
+ ```
18
+
19
+ To log the processed and failed files to an additional file, use:
20
+
21
+ ```bash
22
+ make ingest /path/to/folder -- --watch --log-file /path/to/log/file.log
23
+ ```
24
+
25
+ **Note for Windows Users:** Depending on your Windows version and whether you are using PowerShell to execute
26
+ PrivateGPT API calls, you may need to include the parameter name before passing the folder path for consumption:
27
+
28
+ ```bash
29
+ make ingest arg=/path/to/folder -- --watch --log-file /path/to/log/file.log
30
+ ```
31
+
32
+ After ingestion is complete, you should be able to chat with your documents
33
+ by navigating to http://localhost:8001 and using the option `Query documents`,
34
+ or using the completions / chat API.
35
+
36
+ ## Ingestion troubleshooting
37
+
38
+ ### Running out of memory
39
+
40
+ To do not run out of memory, you should ingest your documents without the LLM loaded in your (video) memory.
41
+ To do so, you should change your configuration to set `llm.mode: mock`.
42
+
43
+ You can also use the existing `PGPT_PROFILES=mock` that will set the following configuration for you:
44
+
45
+ ```yaml
46
+ llm:
47
+ mode: mock
48
+ embedding:
49
+ mode: local
50
+ ```
51
+
52
+ This configuration allows you to use hardware acceleration for creating embeddings while avoiding loading the full LLM into (video) memory.
53
+
54
+ Once your documents are ingested, you can set the `llm.mode` value back to `local` (or your previous custom value).
55
+
56
+ ### Ingestion speed
57
+
58
+ The ingestion speed depends on the number of documents you are ingesting, and the size of each document.
59
+ To speed up the ingestion, you can change the ingestion mode in configuration.
60
+
61
+ The following ingestion mode exist:
62
+ * `simple`: historic behavior, ingest one document at a time, sequentially
63
+ * `batch`: read, parse, and embed multiple documents using batches (batch read, and then batch parse, and then batch embed)
64
+ * `parallel`: read, parse, and embed multiple documents in parallel. This is the fastest ingestion mode for local setup.
65
+ To change the ingestion mode, you can use the `embedding.ingest_mode` configuration value. The default value is `simple`.
66
+
67
+ To configure the number of workers used for parallel or batched ingestion, you can use
68
+ the `embedding.count_workers` configuration value. If you set this value too high, you might run out of
69
+ memory, so be mindful when setting this value. The default value is `2`.
70
+ For `batch` mode, you can easily set this value to your number of threads available on your CPU without
71
+ running out of memory. For `parallel` mode, you should be more careful, and set this value to a lower value.
72
+
73
+ The configuration below should be enough for users who want to stress more their hardware:
74
+ ```yaml
75
+ embedding:
76
+ ingest_mode: parallel
77
+ count_workers: 4
78
+ ```
79
+
80
+ If your hardware is powerful enough, and that you are loading heavy documents, you can increase the number of workers.
81
+ It is recommended to do your own tests to find the optimal value for your hardware.
82
+
83
+ If you have a `bash` shell, you can use this set of command to do your own benchmark:
84
+
85
+ ```bash
86
+ # Wipe your local data, to put yourself in a clean state
87
+ # This will delete all your ingested documents
88
+ make wipe
89
+
90
+ time PGPT_PROFILES=mock python ./scripts/ingest_folder.py ~/my-dir/to-ingest/
91
+ ```
92
+
93
+ ## Supported file formats
94
+
95
+ privateGPT by default supports all the file formats that contains clear text (for example, `.txt` files, `.html`, etc.).
96
+ However, these text based file formats as only considered as text files, and are not pre-processed in any other way.
97
+
98
+ It also supports the following file formats:
99
+ * `.hwp`
100
+ * `.pdf`
101
+ * `.docx`
102
+ * `.pptx`
103
+ * `.ppt`
104
+ * `.pptm`
105
+ * `.jpg`
106
+ * `.png`
107
+ * `.jpeg`
108
+ * `.mp3`
109
+ * `.mp4`
110
+ * `.csv`
111
+ * `.epub`
112
+ * `.md`
113
+ * `.mbox`
114
+ * `.ipynb`
115
+ * `.json`
116
+
117
+ **Please note the following nuance**: while `privateGPT` supports these file formats, it **might** require additional
118
+ dependencies to be installed in your python's virtual environment.
119
+ For example, if you try to ingest `.epub` files, `privateGPT` might fail to do it, and will instead display an
120
+ explanatory error asking you to download the necessary dependencies to install this file format.
121
+
122
+
123
+ **Other file formats might work**, but they will be considered as plain text
124
+ files (in other words, they will be ingested as `.txt` files).
fern/docs/pages/manual/llms.mdx ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Running the Server
2
+
3
+ PrivateGPT supports running with different LLMs & setups.
4
+
5
+ ### Local models
6
+
7
+ Both the LLM and the Embeddings model will run locally.
8
+
9
+ Make sure you have followed the *Local LLM requirements* section before moving on.
10
+
11
+ This command will start PrivateGPT using the `settings.yaml` (default profile) together with the `settings-local.yaml`
12
+ configuration files. By default, it will enable both the API and the Gradio UI. Run:
13
+
14
+ ```bash
15
+ PGPT_PROFILES=local make run
16
+ ```
17
+
18
+ or
19
+
20
+ ```bash
21
+ PGPT_PROFILES=local poetry run python -m private_gpt
22
+ ```
23
+
24
+ When the server is started it will print a log *Application startup complete*.
25
+ Navigate to http://localhost:8001 to use the Gradio UI or to http://localhost:8001/docs (API section) to try the API
26
+ using Swagger UI.
27
+
28
+ ### Using OpenAI
29
+
30
+ If you cannot run a local model (because you don't have a GPU, for example) or for testing purposes, you may
31
+ decide to run PrivateGPT using OpenAI as the LLM and Embeddings model.
32
+
33
+ In order to do so, create a profile `settings-openai.yaml` with the following contents:
34
+
35
+ ```yaml
36
+ llm:
37
+ mode: openai
38
+
39
+ openai:
40
+ api_key: <your_openai_api_key> # You could skip this configuration and use the OPENAI_API_KEY env var instead
41
+ ```
42
+
43
+ And run PrivateGPT loading that profile you just created:
44
+
45
+ `PGPT_PROFILES=openai make run`
46
+
47
+ or
48
+
49
+ `PGPT_PROFILES=openai poetry run python -m private_gpt`
50
+
51
+ When the server is started it will print a log *Application startup complete*.
52
+ Navigate to http://localhost:8001 to use the Gradio UI or to http://localhost:8001/docs (API section) to try the API.
53
+ You'll notice the speed and quality of response is higher, given you are using OpenAI's servers for the heavy
54
+ computations.
55
+
56
+ ### Using AWS Sagemaker
57
+
58
+ For a fully private & performant setup, you can choose to have both your LLM and Embeddings model deployed using Sagemaker.
59
+
60
+ Note: how to deploy models on Sagemaker is out of the scope of this documentation.
61
+
62
+ In order to do so, create a profile `settings-sagemaker.yaml` with the following contents (remember to
63
+ update the values of the llm_endpoint_name and embedding_endpoint_name to yours):
64
+
65
+ ```yaml
66
+ llm:
67
+ mode: sagemaker
68
+
69
+ sagemaker:
70
+ llm_endpoint_name: huggingface-pytorch-tgi-inference-2023-09-25-19-53-32-140
71
+ embedding_endpoint_name: huggingface-pytorch-inference-2023-11-03-07-41-36-479
72
+ ```
73
+
74
+ And run PrivateGPT loading that profile you just created:
75
+
76
+ `PGPT_PROFILES=sagemaker make run`
77
+
78
+ or
79
+
80
+ `PGPT_PROFILES=sagemaker poetry run python -m private_gpt`
81
+
82
+ When the server is started it will print a log *Application startup complete*.
83
+ Navigate to http://localhost:8001 to use the Gradio UI or to http://localhost:8001/docs (API section) to try the API.
fern/docs/pages/manual/settings.mdx ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Settings and profiles for your private GPT
2
+
3
+ The configuration of your private GPT server is done thanks to `settings` files (more precisely `settings.yaml`).
4
+ These text files are written using the [YAML](https://en.wikipedia.org/wiki/YAML) syntax.
5
+
6
+ While privateGPT is distributing safe and universal configuration files, you might want to quickly customize your
7
+ privateGPT, and this can be done using the `settings` files.
8
+
9
+ This project is defining the concept of **profiles** (or configuration profiles).
10
+ This mechanism, using your environment variables, is giving you the ability to easily switch between
11
+ configuration you've made.
12
+
13
+ A typical use case of profile is to easily switch between LLM and embeddings.
14
+ To be a bit more precise, you can change the language (to French, Spanish, Italian, English, etc) by simply changing
15
+ the profile you've selected; no code changes required!
16
+
17
+ PrivateGPT is configured through *profiles* that are defined using yaml files, and selected through env variables.
18
+ The full list of properties configurable can be found in `settings.yaml`.
19
+
20
+ ## How to know which profiles exist
21
+ Given that a profile `foo_bar` points to the file `settings-foo_bar.yaml` and vice-versa, you simply have to look
22
+ at the files starting with `settings` and ending in `.yaml`.
23
+
24
+ ## How to use an existing profiles
25
+ **Please note that the syntax to set the value of an environment variables depends on your OS**.
26
+ You have to set environment variable `PGPT_PROFILES` to the name of the profile you want to use.
27
+
28
+ For example, on **linux and macOS**, this gives:
29
+ ```bash
30
+ export PGPT_PROFILES=my_profile_name_here
31
+ ```
32
+
33
+ Windows Powershell(s) have a different syntax, one of them being:
34
+ ```shell
35
+ set PGPT_PROFILES=my_profile_name_here
36
+ ```
37
+ If the above is not working, you might want to try other ways to set an env variable in your window's terminal.
38
+
39
+ ---
40
+
41
+ Once you've set this environment variable to the desired profile, you can simply launch your privateGPT,
42
+ and it will run using your profile on top of the default configuration.
43
+
44
+ ## Reference
45
+ Additional details on the profiles are described in this section
46
+
47
+ ### Environment variable `PGPT_SETTINGS_FOLDER`
48
+
49
+ The location of the settings folder. Defaults to the root of the project.
50
+ Should contain the default `settings.yaml` and any other `settings-{profile}.yaml`.
51
+
52
+ ### Environment variable `PGPT_PROFILES`
53
+
54
+ By default, the profile definition in `settings.yaml` is loaded.
55
+ Using this env var you can load additional profiles; format is a comma separated list of profile names.
56
+ This will merge `settings-{profile}.yaml` on top of the base settings file.
57
+
58
+ For example:
59
+ `PGPT_PROFILES=local,cuda` will load `settings-local.yaml`
60
+ and `settings-cuda.yaml`, their contents will be merged with
61
+ later profiles properties overriding values of earlier ones like `settings.yaml`.
62
+
63
+ During testing, the `test` profile will be active along with the default, therefore `settings-test.yaml`
64
+ file is required.
65
+
66
+ ### Environment variables expansion
67
+
68
+ Configuration files can contain environment variables,
69
+ they will be expanded at runtime.
70
+
71
+ Expansion must follow the pattern `${VARIABLE_NAME:default_value}`.
72
+
73
+ For example, the following configuration will use the value of the `PORT`
74
+ environment variable or `8001` if it's not set.
75
+ Missing variables with no default will produce an error.
76
+
77
+ ```yaml
78
+ server:
79
+ port: ${PORT:8001}
80
+ ```
fern/docs/pages/manual/ui.mdx ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Gradio UI user manual
2
+
3
+ Gradio UI is a ready to use way of testing most of PrivateGPT API functionalities.
4
+
5
+ ![Gradio PrivateGPT](https://lh3.googleusercontent.com/drive-viewer/AK7aPaD_Hc-A8A9ooMe-hPgm_eImgsbxAjb__8nFYj8b_WwzvL1Gy90oAnp1DfhPaN6yGiEHCOXs0r77W1bYHtPzlVwbV7fMsA=s1600)
6
+
7
+ ### Execution Modes
8
+
9
+ It has 3 modes of execution (you can select in the top-left):
10
+
11
+ * Query Docs: uses the context from the
12
+ ingested documents to answer the questions posted in the chat. It also takes
13
+ into account previous chat messages as context.
14
+ * Makes use of `/chat/completions` API with `use_context=true` and no
15
+ `context_filter`.
16
+ * Search in Docs: fast search that returns the 4 most related text
17
+ chunks, together with their source document and page.
18
+ * Makes use of `/chunks` API with no `context_filter`, `limit=4` and
19
+ `prev_next_chunks=0`.
20
+ * LLM Chat: simple, non-contextual chat with the LLM. The ingested documents won't
21
+ be taken into account, only the previous messages.
22
+ * Makes use of `/chat/completions` API with `use_context=false`.
23
+
24
+ ### Document Ingestion
25
+
26
+ Ingest documents by using the `Upload a File` button. You can check the progress of
27
+ the ingestion in the console logs of the server.
28
+
29
+ The list of ingested files is shown below the button.
30
+
31
+ If you want to delete the ingested documents, refer to *Reset Local documents
32
+ database* section in the documentation.
33
+
34
+ ### Chat
35
+
36
+ Normal chat interface, self-explanatory ;)
37
+
38
+ You can check the actual prompt being passed to the LLM by looking at the logs of
39
+ the server. We'll add better observability in future releases.
fern/docs/pages/manual/vectordb.mdx ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Vectorstores
2
+ PrivateGPT supports [Qdrant](https://qdrant.tech/) and [Chroma](https://www.trychroma.com/) as vectorstore providers. Qdrant being the default.
3
+
4
+ In order to select one or the other, set the `vectorstore.database` property in the `settings.yaml` file to `qdrant` or `chroma`.
5
+
6
+ ```yaml
7
+ vectorstore:
8
+ database: qdrant
9
+ ```
10
+
11
+ ### Qdrant configuration
12
+
13
+ To enable Qdrant, set the `vectorstore.database` property in the `settings.yaml` file to `qdrant`.
14
+
15
+ Qdrant settings can be configured by setting values to the `qdrant` property in the `settings.yaml` file.
16
+
17
+ The available configuration options are:
18
+ | Field | Description |
19
+ |--------------|-------------|
20
+ | location | If `:memory:` - use in-memory Qdrant instance. If `str` - use it as a `url` parameter.|
21
+ | url | Either host or str of 'Optional[scheme], host, Optional[port], Optional[prefix]'. Eg. `http://localhost:6333` |
22
+ | port | Port of the REST API interface. Default: `6333` |
23
+ | grpc_port | Port of the gRPC interface. Default: `6334` |
24
+ | prefer_grpc | If `true` - use gRPC interface whenever possible in custom methods. |
25
+ | https | If `true` - use HTTPS(SSL) protocol.|
26
+ | api_key | API key for authentication in Qdrant Cloud.|
27
+ | prefix | If set, add `prefix` to the REST URL path. Example: `service/v1` will result in `http://localhost:6333/service/v1/{qdrant-endpoint}` for REST API.|
28
+ | timeout | Timeout for REST and gRPC API requests. Default: 5.0 seconds for REST and unlimited for gRPC |
29
+ | host | Host name of Qdrant service. If url and host are not set, defaults to 'localhost'.|
30
+ | path | Persistence path for QdrantLocal. Eg. `local_data/private_gpt/qdrant`|
31
+ | force_disable_check_same_thread | Force disable check_same_thread for QdrantLocal sqlite connection, defaults to True.|
32
+
33
+ By default Qdrant tries to connect to an instance of Qdrant server at `http://localhost:3000`.
34
+
35
+ To obtain a local setup (disk-based database) without running a Qdrant server, configure the `qdrant.path` value in settings.yaml:
36
+
37
+ ```yaml
38
+ qdrant:
39
+ path: local_data/private_gpt/qdrant
40
+ ```
41
+
42
+ ### Chroma configuration
43
+
44
+ To enable Chroma, set the `vectorstore.database` property in the `settings.yaml` file to `chroma` and install the `chroma` extra.
45
+
46
+ ```bash
47
+ poetry install --extras chroma
48
+ ```
49
+
50
+ By default `chroma` will use a disk-based database stored in local_data_path / "chroma_db" (being local_data_path defined in settings.yaml)
fern/docs/pages/overview/quickstart.mdx ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Local Installation steps
2
+
3
+ The steps in [Installation](/installation) section are better explained and cover more
4
+ setup scenarios (macOS, Windows, Linux).
5
+ But if you like one-liners, have python3.11 installed, and you are running a UNIX (macOS or Linux)
6
+ system, you can get up and running on CPU in few lines:
7
+
8
+ ```bash
9
+ git clone https://github.com/imartinez/privateGPT && cd privateGPT && \
10
+ python3.11 -m venv .venv && source .venv/bin/activate && \
11
+ pip install --upgrade pip poetry && poetry install --with ui,local && ./scripts/setup
12
+
13
+ # Launch the privateGPT API server **and** the gradio UI
14
+ python3.11 -m private_gpt
15
+
16
+ # In another terminal, create a new browser window on your private GPT!
17
+ open http:////127.0.0.1:8001/
18
+ ```
19
+
20
+ The above is not working, or it is too slow, so **you want to run it on GPU(s)**?
21
+ Please check the more detailed [installation guide](/installation).
fern/docs/pages/overview/welcome.mdx ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Introduction 👋
2
+
3
+ PrivateGPT provides an **API** containing all the building blocks required to
4
+ build **private, context-aware AI applications**.
5
+ The API follows and extends OpenAI API standard, and supports both normal and streaming responses.
6
+ That means that, if you can use OpenAI API in one of your tools, you can use your own PrivateGPT API instead,
7
+ with no code changes, **and for free** if you are running privateGPT in `local` mode.
8
+
9
+ Looking for the installation quickstart? [Quickstart installation guide for Linux and macOS](/overview/welcome/quickstart).
10
+
11
+ Do you want to install it on Windows? Or do you want to take full advantage of your hardware for better performances?
12
+ The installation guide will help you in the [Installation section](/installation).
13
+
14
+
15
+ ## Frequently Visited Resources
16
+
17
+ <Cards>
18
+ <Card
19
+ title="API Reference"
20
+ icon="fa-solid fa-code"
21
+ href="/api-reference"
22
+ />
23
+ <Card
24
+ title="Twitter"
25
+ icon="fa-brands fa-twitter"
26
+ href="https://twitter.com/PrivateGPT_AI"
27
+ />
28
+ <Card
29
+ title="Discord Server"
30
+ icon="fa-brands fa-discord"
31
+ href="https://discord.gg/bK6mRVpErU"
32
+ />
33
+ </Cards>
34
+
35
+ ## API Organization
36
+
37
+ The API is divided in two logical blocks:
38
+
39
+ 1. High-level API, abstracting all the complexity of a RAG (Retrieval Augmented Generation) pipeline implementation:
40
+ - Ingestion of documents: internally managing document parsing, splitting, metadata extraction,
41
+ embedding generation and storage.
42
+ - Chat & Completions using context from ingested documents: abstracting the retrieval of context, the prompt
43
+ engineering and the response generation.
44
+
45
+ 2. Low-level API, allowing advanced users to implement their own complex pipelines:
46
+ - Embeddings generation: based on a piece of text.
47
+ - Contextual chunks retrieval: given a query, returns the most relevant chunks of text from the ingested
48
+ documents.
49
+
50
+ <Callout intent = "info">
51
+ A working **Gradio UI client** is provided to test the API, together with a set of useful tools such as bulk
52
+ model download script, ingestion script, documents folder watch, etc.
53
+ </Callout>
fern/docs/pages/recipes/list-llm.mdx ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # List of working LLM
2
+
3
+ **Do you have any working combination of LLM and embeddings?**
4
+ Please open a PR to add it to the list, and come on our Discord to tell us about it!
5
+
6
+ ## Prompt style
7
+
8
+ LLMs might have been trained with different prompt styles.
9
+ The prompt style is the way the prompt is written, and how the system message is injected in the prompt.
10
+
11
+ For example, `llama2` looks like this:
12
+ ```text
13
+ <s>[INST] <<SYS>>
14
+ {{ system_prompt }}
15
+ <</SYS>>
16
+
17
+ {{ user_message }} [/INST]
18
+ ```
19
+
20
+ While `default` (the `llama_index` default) looks like this:
21
+ ```text
22
+ system: {{ system_prompt }}
23
+ user: {{ user_message }}
24
+ assistant: {{ assistant_message }}
25
+ ```
26
+
27
+ And the "`tag`" style looks like this:
28
+
29
+ ```text
30
+ <|system|>: {{ system_prompt }}
31
+ <|user|>: {{ user_message }}
32
+ <|assistant|>: {{ assistant_message }}
33
+ ```
34
+
35
+ Some LLMs will not understand this prompt style, and will not work (returning nothing).
36
+ You can try to change the prompt style to `default` (or `tag`) in the settings, and it will
37
+ change the way the messages are formatted to be passed to the LLM.
38
+
39
+ ## Example of configuration
40
+
41
+ You might want to change the prompt depending on the language and model you are using.
42
+
43
+ ### English, with instructions
44
+
45
+ `settings-en.yaml`:
46
+ ```yml
47
+ local:
48
+ llm_hf_repo_id: TheBloke/Mistral-7B-Instruct-v0.1-GGUF
49
+ llm_hf_model_file: mistral-7b-instruct-v0.1.Q4_K_M.gguf
50
+ embedding_hf_model_name: BAAI/bge-small-en-v1.5
51
+ prompt_style: "llama2"
52
+ ```
53
+
54
+ ### French, with instructions
55
+
56
+ `settings-fr.yaml`:
57
+ ```yml
58
+ local:
59
+ llm_hf_repo_id: TheBloke/Vigogne-2-7B-Instruct-GGUF
60
+ llm_hf_model_file: vigogne-2-7b-instruct.Q4_K_M.gguf
61
+ embedding_hf_model_name: dangvantuan/sentence-camembert-base
62
+ prompt_style: "default"
63
+ # prompt_style: "tag" # also works
64
+ # The default system prompt is injected only when the `prompt_style` != default, and there are no system message in the discussion
65
+ # default_system_prompt: Vous êtes un assistant IA qui répond à la question posée à la fin en utilisant le contexte suivant. Si vous ne connaissez pas la réponse, dites simplement que vous ne savez pas, n'essayez pas d'inventer une réponse. Veuillez répondre exclusivement en français.
66
+ ```
67
+
68
+ You might want to change the prompt as the one above might not directly answer your question.
69
+ You can read online about how to write a good prompt, but in a nutshell, make it (extremely) directive.
70
+
71
+ You can try and troubleshot your prompt by writing multiline requests in the UI, while
72
+ writing your interaction with the model, for example:
73
+
74
+ ```text
75
+ Tu es un programmeur senior qui programme en python et utilise le framework fastapi. Ecrit moi un serveur qui retourne "hello world".
76
+ ```
77
+
78
+ Another example:
79
+ ```text
80
+ Context: None
81
+ Situation: tu es au milieu d'un champ.
82
+ Tache: va a la rivière, en bas du champ.
83
+ Décrit comment aller a la rivière.
84
+ ```
85
+
86
+ ### Optimised Models
87
+ GodziLLa2-70B LLM (English, rank 2 on HuggingFace OpenLLM Leaderboard), bge large Embedding Model (rank 1 on HuggingFace MTEB Leaderboard)
88
+ `settings-optimised.yaml`:
89
+ ```yml
90
+ local:
91
+ llm_hf_repo_id: TheBloke/GodziLLa2-70B-GGUF
92
+ llm_hf_model_file: godzilla2-70b.Q4_K_M.gguf
93
+ embedding_hf_model_name: BAAI/bge-large-en
94
+ prompt_style: "llama2"
95
+ ```
fern/fern.config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "organization": "privategpt",
3
+ "version": "0.15.3"
4
+ }
fern/generators.yml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ groups:
2
+ public:
3
+ generators:
4
+ - name: fernapi/fern-python-sdk
5
+ version: 0.6.2
6
+ output:
7
+ location: local-file-system
8
+ path: ../../pgpt-sdk/python
fern/openapi/openapi.json ADDED
@@ -0,0 +1,1012 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "PrivateGPT",
5
+ "summary": "PrivateGPT is a production-ready AI project that allows you to ask questions to your documents using the power of Large Language Models (LLMs), even in scenarios without Internet connection. 100% private, no data leaves your execution environment at any point.",
6
+ "description": "",
7
+ "contact": {
8
+ "url": "https://github.com/imartinez/privateGPT"
9
+ },
10
+ "license": {
11
+ "name": "Apache 2.0",
12
+ "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
13
+ },
14
+ "version": "0.1.0",
15
+ "x-logo": {
16
+ "url": "https://lh3.googleusercontent.com/drive-viewer/AK7aPaD_iNlMoTquOBsw4boh4tIYxyEuhz6EtEs8nzq3yNkNAK00xGjE1KUCmPJSk3TYOjcs6tReG6w_cLu1S7L_gPgT9z52iw=s2560"
17
+ }
18
+ },
19
+ "paths": {
20
+ "/v1/completions": {
21
+ "post": {
22
+ "tags": [
23
+ "Contextual Completions"
24
+ ],
25
+ "summary": "Completion",
26
+ "description": "We recommend most users use our Chat completions API.\n\nGiven a prompt, the model will return one predicted completion.\n\nOptionally include a `system_prompt` to influence the way the LLM answers.\n\nIf `use_context`\nis set to `true`, the model will use context coming from the ingested documents\nto create the response. The documents being used can be filtered using the\n`context_filter` and passing the document IDs to be used. Ingested documents IDs\ncan be found using `/ingest/list` endpoint. If you want all ingested documents to\nbe used, remove `context_filter` altogether.\n\nWhen using `'include_sources': true`, the API will return the source Chunks used\nto create the response, which come from the context provided.\n\nWhen using `'stream': true`, the API will return data chunks following [OpenAI's\nstreaming model](https://platform.openai.com/docs/api-reference/chat/streaming):\n```\n{\"id\":\"12345\",\"object\":\"completion.chunk\",\"created\":1694268190,\n\"model\":\"private-gpt\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\n\"finish_reason\":null}]}\n```",
27
+ "operationId": "prompt_completion_v1_completions_post",
28
+ "requestBody": {
29
+ "content": {
30
+ "application/json": {
31
+ "schema": {
32
+ "$ref": "#/components/schemas/CompletionsBody"
33
+ }
34
+ }
35
+ },
36
+ "required": true
37
+ },
38
+ "responses": {
39
+ "200": {
40
+ "description": "Successful Response",
41
+ "content": {
42
+ "application/json": {
43
+ "schema": {
44
+ "$ref": "#/components/schemas/OpenAICompletion"
45
+ }
46
+ }
47
+ }
48
+ },
49
+ "422": {
50
+ "description": "Validation Error",
51
+ "content": {
52
+ "application/json": {
53
+ "schema": {
54
+ "$ref": "#/components/schemas/HTTPValidationError"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ },
62
+ "/v1/chat/completions": {
63
+ "post": {
64
+ "tags": [
65
+ "Contextual Completions"
66
+ ],
67
+ "summary": "Chat Completion",
68
+ "description": "Given a list of messages comprising a conversation, return a response.\n\nOptionally include a `system_prompt` to influence the way the LLM answers.\n\nIf `use_context` is set to `true`, the model will use context coming\nfrom the ingested documents to create the response. The documents being used can\nbe filtered using the `context_filter` and passing the document IDs to be used.\nIngested documents IDs can be found using `/ingest/list` endpoint. If you want\nall ingested documents to be used, remove `context_filter` altogether.\n\nWhen using `'include_sources': true`, the API will return the source Chunks used\nto create the response, which come from the context provided.\n\nWhen using `'stream': true`, the API will return data chunks following [OpenAI's\nstreaming model](https://platform.openai.com/docs/api-reference/chat/streaming):\n```\n{\"id\":\"12345\",\"object\":\"completion.chunk\",\"created\":1694268190,\n\"model\":\"private-gpt\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\n\"finish_reason\":null}]}\n```",
69
+ "operationId": "chat_completion_v1_chat_completions_post",
70
+ "requestBody": {
71
+ "content": {
72
+ "application/json": {
73
+ "schema": {
74
+ "$ref": "#/components/schemas/ChatBody"
75
+ }
76
+ }
77
+ },
78
+ "required": true
79
+ },
80
+ "responses": {
81
+ "200": {
82
+ "description": "Successful Response",
83
+ "content": {
84
+ "application/json": {
85
+ "schema": {
86
+ "$ref": "#/components/schemas/OpenAICompletion"
87
+ }
88
+ }
89
+ }
90
+ },
91
+ "422": {
92
+ "description": "Validation Error",
93
+ "content": {
94
+ "application/json": {
95
+ "schema": {
96
+ "$ref": "#/components/schemas/HTTPValidationError"
97
+ }
98
+ }
99
+ }
100
+ }
101
+ }
102
+ }
103
+ },
104
+ "/v1/chunks": {
105
+ "post": {
106
+ "tags": [
107
+ "Context Chunks"
108
+ ],
109
+ "summary": "Chunks Retrieval",
110
+ "description": "Given a `text`, returns the most relevant chunks from the ingested documents.\n\nThe returned information can be used to generate prompts that can be\npassed to `/completions` or `/chat/completions` APIs. Note: it is usually a very\nfast API, because only the Embeddings model is involved, not the LLM. The\nreturned information contains the relevant chunk `text` together with the source\n`document` it is coming from. It also contains a score that can be used to\ncompare different results.\n\nThe max number of chunks to be returned is set using the `limit` param.\n\nPrevious and next chunks (pieces of text that appear right before or after in the\ndocument) can be fetched by using the `prev_next_chunks` field.\n\nThe documents being used can be filtered using the `context_filter` and passing\nthe document IDs to be used. Ingested documents IDs can be found using\n`/ingest/list` endpoint. If you want all ingested documents to be used,\nremove `context_filter` altogether.",
111
+ "operationId": "chunks_retrieval_v1_chunks_post",
112
+ "requestBody": {
113
+ "content": {
114
+ "application/json": {
115
+ "schema": {
116
+ "$ref": "#/components/schemas/ChunksBody"
117
+ }
118
+ }
119
+ },
120
+ "required": true
121
+ },
122
+ "responses": {
123
+ "200": {
124
+ "description": "Successful Response",
125
+ "content": {
126
+ "application/json": {
127
+ "schema": {
128
+ "$ref": "#/components/schemas/ChunksResponse"
129
+ }
130
+ }
131
+ }
132
+ },
133
+ "422": {
134
+ "description": "Validation Error",
135
+ "content": {
136
+ "application/json": {
137
+ "schema": {
138
+ "$ref": "#/components/schemas/HTTPValidationError"
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+ },
146
+ "/v1/ingest": {
147
+ "post": {
148
+ "tags": [
149
+ "Ingestion"
150
+ ],
151
+ "summary": "Ingest",
152
+ "description": "Ingests and processes a file, storing its chunks to be used as context.\n\nThe context obtained from files is later used in\n`/chat/completions`, `/completions`, and `/chunks` APIs.\n\nMost common document\nformats are supported, but you may be prompted to install an extra dependency to\nmanage a specific file type.\n\nA file can generate different Documents (for example a PDF generates one Document\nper page). All Documents IDs are returned in the response, together with the\nextracted Metadata (which is later used to improve context retrieval). Those IDs\ncan be used to filter the context used to create responses in\n`/chat/completions`, `/completions`, and `/chunks` APIs.",
153
+ "operationId": "ingest_v1_ingest_post",
154
+ "requestBody": {
155
+ "content": {
156
+ "multipart/form-data": {
157
+ "schema": {
158
+ "$ref": "#/components/schemas/Body_ingest_v1_ingest_post"
159
+ }
160
+ }
161
+ },
162
+ "required": true
163
+ },
164
+ "responses": {
165
+ "200": {
166
+ "description": "Successful Response",
167
+ "content": {
168
+ "application/json": {
169
+ "schema": {
170
+ "$ref": "#/components/schemas/IngestResponse"
171
+ }
172
+ }
173
+ }
174
+ },
175
+ "422": {
176
+ "description": "Validation Error",
177
+ "content": {
178
+ "application/json": {
179
+ "schema": {
180
+ "$ref": "#/components/schemas/HTTPValidationError"
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ },
188
+ "/v1/ingest/list": {
189
+ "get": {
190
+ "tags": [
191
+ "Ingestion"
192
+ ],
193
+ "summary": "List Ingested",
194
+ "description": "Lists already ingested Documents including their Document ID and metadata.\n\nThose IDs can be used to filter the context used to create responses\nin `/chat/completions`, `/completions`, and `/chunks` APIs.",
195
+ "operationId": "list_ingested_v1_ingest_list_get",
196
+ "responses": {
197
+ "200": {
198
+ "description": "Successful Response",
199
+ "content": {
200
+ "application/json": {
201
+ "schema": {
202
+ "$ref": "#/components/schemas/IngestResponse"
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
208
+ }
209
+ },
210
+ "/v1/ingest/{doc_id}": {
211
+ "delete": {
212
+ "tags": [
213
+ "Ingestion"
214
+ ],
215
+ "summary": "Delete Ingested",
216
+ "description": "Delete the specified ingested Document.\n\nThe `doc_id` can be obtained from the `GET /ingest/list` endpoint.\nThe document will be effectively deleted from your storage context.",
217
+ "operationId": "delete_ingested_v1_ingest__doc_id__delete",
218
+ "parameters": [
219
+ {
220
+ "name": "doc_id",
221
+ "in": "path",
222
+ "required": true,
223
+ "schema": {
224
+ "type": "string",
225
+ "title": "Doc Id"
226
+ }
227
+ }
228
+ ],
229
+ "responses": {
230
+ "200": {
231
+ "description": "Successful Response",
232
+ "content": {
233
+ "application/json": {
234
+ "schema": {}
235
+ }
236
+ }
237
+ },
238
+ "422": {
239
+ "description": "Validation Error",
240
+ "content": {
241
+ "application/json": {
242
+ "schema": {
243
+ "$ref": "#/components/schemas/HTTPValidationError"
244
+ }
245
+ }
246
+ }
247
+ }
248
+ }
249
+ }
250
+ },
251
+ "/v1/embeddings": {
252
+ "post": {
253
+ "tags": [
254
+ "Embeddings"
255
+ ],
256
+ "summary": "Embeddings Generation",
257
+ "description": "Get a vector representation of a given input.\n\nThat vector representation can be easily consumed\nby machine learning models and algorithms.",
258
+ "operationId": "embeddings_generation_v1_embeddings_post",
259
+ "requestBody": {
260
+ "content": {
261
+ "application/json": {
262
+ "schema": {
263
+ "$ref": "#/components/schemas/EmbeddingsBody"
264
+ }
265
+ }
266
+ },
267
+ "required": true
268
+ },
269
+ "responses": {
270
+ "200": {
271
+ "description": "Successful Response",
272
+ "content": {
273
+ "application/json": {
274
+ "schema": {
275
+ "$ref": "#/components/schemas/EmbeddingsResponse"
276
+ }
277
+ }
278
+ }
279
+ },
280
+ "422": {
281
+ "description": "Validation Error",
282
+ "content": {
283
+ "application/json": {
284
+ "schema": {
285
+ "$ref": "#/components/schemas/HTTPValidationError"
286
+ }
287
+ }
288
+ }
289
+ }
290
+ }
291
+ }
292
+ },
293
+ "/health": {
294
+ "get": {
295
+ "tags": [
296
+ "Health"
297
+ ],
298
+ "summary": "Health",
299
+ "description": "Return ok if the system is up.",
300
+ "operationId": "health_health_get",
301
+ "responses": {
302
+ "200": {
303
+ "description": "Successful Response",
304
+ "content": {
305
+ "application/json": {
306
+ "schema": {
307
+ "$ref": "#/components/schemas/HealthResponse"
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
313
+ }
314
+ }
315
+ },
316
+ "components": {
317
+ "schemas": {
318
+ "Body_ingest_v1_ingest_post": {
319
+ "properties": {
320
+ "file": {
321
+ "type": "string",
322
+ "format": "binary",
323
+ "title": "File"
324
+ }
325
+ },
326
+ "type": "object",
327
+ "required": [
328
+ "file"
329
+ ],
330
+ "title": "Body_ingest_v1_ingest_post"
331
+ },
332
+ "ChatBody": {
333
+ "properties": {
334
+ "messages": {
335
+ "items": {
336
+ "$ref": "#/components/schemas/OpenAIMessage"
337
+ },
338
+ "type": "array",
339
+ "title": "Messages"
340
+ },
341
+ "system_prompt": {
342
+ "anyOf": [
343
+ {
344
+ "type": "string"
345
+ },
346
+ {
347
+ "type": "null"
348
+ }
349
+ ],
350
+ "title": "System Prompt"
351
+ },
352
+ "use_context": {
353
+ "type": "boolean",
354
+ "title": "Use Context",
355
+ "default": false
356
+ },
357
+ "context_filter": {
358
+ "anyOf": [
359
+ {
360
+ "$ref": "#/components/schemas/ContextFilter"
361
+ },
362
+ {
363
+ "type": "null"
364
+ }
365
+ ]
366
+ },
367
+ "include_sources": {
368
+ "type": "boolean",
369
+ "title": "Include Sources",
370
+ "default": true
371
+ },
372
+ "stream": {
373
+ "type": "boolean",
374
+ "title": "Stream",
375
+ "default": false
376
+ }
377
+ },
378
+ "type": "object",
379
+ "required": [
380
+ "messages"
381
+ ],
382
+ "title": "ChatBody",
383
+ "examples": [
384
+ {
385
+ "context_filter": {
386
+ "docs_ids": [
387
+ "c202d5e6-7b69-4869-81cc-dd574ee8ee11"
388
+ ]
389
+ },
390
+ "include_sources": true,
391
+ "messages": [
392
+ {
393
+ "content": "How do you fry an egg?",
394
+ "role": "user"
395
+ }
396
+ ],
397
+ "stream": false,
398
+ "system_prompt": "You are a rapper. Always answer with a rap.",
399
+ "use_context": true
400
+ }
401
+ ]
402
+ },
403
+ "Chunk": {
404
+ "properties": {
405
+ "object": {
406
+ "const": "context.chunk",
407
+ "title": "Object"
408
+ },
409
+ "score": {
410
+ "type": "number",
411
+ "title": "Score",
412
+ "examples": [
413
+ 0.023
414
+ ]
415
+ },
416
+ "document": {
417
+ "$ref": "#/components/schemas/IngestedDoc"
418
+ },
419
+ "text": {
420
+ "type": "string",
421
+ "title": "Text",
422
+ "examples": [
423
+ "Outbound sales increased 20%, driven by new leads."
424
+ ]
425
+ },
426
+ "previous_texts": {
427
+ "anyOf": [
428
+ {
429
+ "items": {
430
+ "type": "string"
431
+ },
432
+ "type": "array"
433
+ },
434
+ {
435
+ "type": "null"
436
+ }
437
+ ],
438
+ "title": "Previous Texts",
439
+ "examples": [
440
+ [
441
+ "SALES REPORT 2023",
442
+ "Inbound didn't show major changes."
443
+ ]
444
+ ]
445
+ },
446
+ "next_texts": {
447
+ "anyOf": [
448
+ {
449
+ "items": {
450
+ "type": "string"
451
+ },
452
+ "type": "array"
453
+ },
454
+ {
455
+ "type": "null"
456
+ }
457
+ ],
458
+ "title": "Next Texts",
459
+ "examples": [
460
+ [
461
+ "New leads came from Google Ads campaign.",
462
+ "The campaign was run by the Marketing Department"
463
+ ]
464
+ ]
465
+ }
466
+ },
467
+ "type": "object",
468
+ "required": [
469
+ "object",
470
+ "score",
471
+ "document",
472
+ "text"
473
+ ],
474
+ "title": "Chunk"
475
+ },
476
+ "ChunksBody": {
477
+ "properties": {
478
+ "text": {
479
+ "type": "string",
480
+ "title": "Text",
481
+ "examples": [
482
+ "Q3 2023 sales"
483
+ ]
484
+ },
485
+ "context_filter": {
486
+ "anyOf": [
487
+ {
488
+ "$ref": "#/components/schemas/ContextFilter"
489
+ },
490
+ {
491
+ "type": "null"
492
+ }
493
+ ]
494
+ },
495
+ "limit": {
496
+ "type": "integer",
497
+ "title": "Limit",
498
+ "default": 10
499
+ },
500
+ "prev_next_chunks": {
501
+ "type": "integer",
502
+ "title": "Prev Next Chunks",
503
+ "default": 0,
504
+ "examples": [
505
+ 2
506
+ ]
507
+ }
508
+ },
509
+ "type": "object",
510
+ "required": [
511
+ "text"
512
+ ],
513
+ "title": "ChunksBody"
514
+ },
515
+ "ChunksResponse": {
516
+ "properties": {
517
+ "object": {
518
+ "const": "list",
519
+ "title": "Object"
520
+ },
521
+ "model": {
522
+ "const": "private-gpt",
523
+ "title": "Model"
524
+ },
525
+ "data": {
526
+ "items": {
527
+ "$ref": "#/components/schemas/Chunk"
528
+ },
529
+ "type": "array",
530
+ "title": "Data"
531
+ }
532
+ },
533
+ "type": "object",
534
+ "required": [
535
+ "object",
536
+ "model",
537
+ "data"
538
+ ],
539
+ "title": "ChunksResponse"
540
+ },
541
+ "CompletionsBody": {
542
+ "properties": {
543
+ "prompt": {
544
+ "type": "string",
545
+ "title": "Prompt"
546
+ },
547
+ "system_prompt": {
548
+ "anyOf": [
549
+ {
550
+ "type": "string"
551
+ },
552
+ {
553
+ "type": "null"
554
+ }
555
+ ],
556
+ "title": "System Prompt"
557
+ },
558
+ "use_context": {
559
+ "type": "boolean",
560
+ "title": "Use Context",
561
+ "default": false
562
+ },
563
+ "context_filter": {
564
+ "anyOf": [
565
+ {
566
+ "$ref": "#/components/schemas/ContextFilter"
567
+ },
568
+ {
569
+ "type": "null"
570
+ }
571
+ ]
572
+ },
573
+ "include_sources": {
574
+ "type": "boolean",
575
+ "title": "Include Sources",
576
+ "default": true
577
+ },
578
+ "stream": {
579
+ "type": "boolean",
580
+ "title": "Stream",
581
+ "default": false
582
+ }
583
+ },
584
+ "type": "object",
585
+ "required": [
586
+ "prompt"
587
+ ],
588
+ "title": "CompletionsBody",
589
+ "examples": [
590
+ {
591
+ "include_sources": false,
592
+ "prompt": "How do you fry an egg?",
593
+ "stream": false,
594
+ "use_context": false
595
+ }
596
+ ]
597
+ },
598
+ "ContextFilter": {
599
+ "properties": {
600
+ "docs_ids": {
601
+ "anyOf": [
602
+ {
603
+ "items": {
604
+ "type": "string"
605
+ },
606
+ "type": "array"
607
+ },
608
+ {
609
+ "type": "null"
610
+ }
611
+ ],
612
+ "title": "Docs Ids",
613
+ "examples": [
614
+ [
615
+ "c202d5e6-7b69-4869-81cc-dd574ee8ee11"
616
+ ]
617
+ ]
618
+ }
619
+ },
620
+ "type": "object",
621
+ "required": [
622
+ "docs_ids"
623
+ ],
624
+ "title": "ContextFilter"
625
+ },
626
+ "Embedding": {
627
+ "properties": {
628
+ "index": {
629
+ "type": "integer",
630
+ "title": "Index"
631
+ },
632
+ "object": {
633
+ "const": "embedding",
634
+ "title": "Object"
635
+ },
636
+ "embedding": {
637
+ "items": {
638
+ "type": "number"
639
+ },
640
+ "type": "array",
641
+ "title": "Embedding",
642
+ "examples": [
643
+ [
644
+ 0.0023064255,
645
+ -0.009327292
646
+ ]
647
+ ]
648
+ }
649
+ },
650
+ "type": "object",
651
+ "required": [
652
+ "index",
653
+ "object",
654
+ "embedding"
655
+ ],
656
+ "title": "Embedding"
657
+ },
658
+ "EmbeddingsBody": {
659
+ "properties": {
660
+ "input": {
661
+ "anyOf": [
662
+ {
663
+ "type": "string"
664
+ },
665
+ {
666
+ "items": {
667
+ "type": "string"
668
+ },
669
+ "type": "array"
670
+ }
671
+ ],
672
+ "title": "Input"
673
+ }
674
+ },
675
+ "type": "object",
676
+ "required": [
677
+ "input"
678
+ ],
679
+ "title": "EmbeddingsBody"
680
+ },
681
+ "EmbeddingsResponse": {
682
+ "properties": {
683
+ "object": {
684
+ "const": "list",
685
+ "title": "Object"
686
+ },
687
+ "model": {
688
+ "const": "private-gpt",
689
+ "title": "Model"
690
+ },
691
+ "data": {
692
+ "items": {
693
+ "$ref": "#/components/schemas/Embedding"
694
+ },
695
+ "type": "array",
696
+ "title": "Data"
697
+ }
698
+ },
699
+ "type": "object",
700
+ "required": [
701
+ "object",
702
+ "model",
703
+ "data"
704
+ ],
705
+ "title": "EmbeddingsResponse"
706
+ },
707
+ "HTTPValidationError": {
708
+ "properties": {
709
+ "detail": {
710
+ "items": {
711
+ "$ref": "#/components/schemas/ValidationError"
712
+ },
713
+ "type": "array",
714
+ "title": "Detail"
715
+ }
716
+ },
717
+ "type": "object",
718
+ "title": "HTTPValidationError"
719
+ },
720
+ "HealthResponse": {
721
+ "properties": {
722
+ "status": {
723
+ "const": "ok",
724
+ "title": "Status",
725
+ "default": "ok"
726
+ }
727
+ },
728
+ "type": "object",
729
+ "title": "HealthResponse"
730
+ },
731
+ "IngestResponse": {
732
+ "properties": {
733
+ "object": {
734
+ "const": "list",
735
+ "title": "Object"
736
+ },
737
+ "model": {
738
+ "const": "private-gpt",
739
+ "title": "Model"
740
+ },
741
+ "data": {
742
+ "items": {
743
+ "$ref": "#/components/schemas/IngestedDoc"
744
+ },
745
+ "type": "array",
746
+ "title": "Data"
747
+ }
748
+ },
749
+ "type": "object",
750
+ "required": [
751
+ "object",
752
+ "model",
753
+ "data"
754
+ ],
755
+ "title": "IngestResponse"
756
+ },
757
+ "IngestedDoc": {
758
+ "properties": {
759
+ "object": {
760
+ "const": "ingest.document",
761
+ "title": "Object"
762
+ },
763
+ "doc_id": {
764
+ "type": "string",
765
+ "title": "Doc Id",
766
+ "examples": [
767
+ "c202d5e6-7b69-4869-81cc-dd574ee8ee11"
768
+ ]
769
+ },
770
+ "doc_metadata": {
771
+ "anyOf": [
772
+ {
773
+ "type": "object"
774
+ },
775
+ {
776
+ "type": "null"
777
+ }
778
+ ],
779
+ "title": "Doc Metadata",
780
+ "examples": [
781
+ {
782
+ "file_name": "Sales Report Q3 2023.pdf",
783
+ "page_label": "2"
784
+ }
785
+ ]
786
+ }
787
+ },
788
+ "type": "object",
789
+ "required": [
790
+ "object",
791
+ "doc_id",
792
+ "doc_metadata"
793
+ ],
794
+ "title": "IngestedDoc"
795
+ },
796
+ "OpenAIChoice": {
797
+ "properties": {
798
+ "finish_reason": {
799
+ "anyOf": [
800
+ {
801
+ "type": "string"
802
+ },
803
+ {
804
+ "type": "null"
805
+ }
806
+ ],
807
+ "title": "Finish Reason",
808
+ "examples": [
809
+ "stop"
810
+ ]
811
+ },
812
+ "delta": {
813
+ "anyOf": [
814
+ {
815
+ "$ref": "#/components/schemas/OpenAIDelta"
816
+ },
817
+ {
818
+ "type": "null"
819
+ }
820
+ ]
821
+ },
822
+ "message": {
823
+ "anyOf": [
824
+ {
825
+ "$ref": "#/components/schemas/OpenAIMessage"
826
+ },
827
+ {
828
+ "type": "null"
829
+ }
830
+ ]
831
+ },
832
+ "sources": {
833
+ "anyOf": [
834
+ {
835
+ "items": {
836
+ "$ref": "#/components/schemas/Chunk"
837
+ },
838
+ "type": "array"
839
+ },
840
+ {
841
+ "type": "null"
842
+ }
843
+ ],
844
+ "title": "Sources"
845
+ },
846
+ "index": {
847
+ "type": "integer",
848
+ "title": "Index",
849
+ "default": 0
850
+ }
851
+ },
852
+ "type": "object",
853
+ "required": [
854
+ "finish_reason"
855
+ ],
856
+ "title": "OpenAIChoice",
857
+ "description": "Response from AI.\n\nEither the delta or the message will be present, but never both.\nSources used will be returned in case context retrieval was enabled."
858
+ },
859
+ "OpenAICompletion": {
860
+ "properties": {
861
+ "id": {
862
+ "type": "string",
863
+ "title": "Id"
864
+ },
865
+ "object": {
866
+ "type": "string",
867
+ "enum": [
868
+ "completion",
869
+ "completion.chunk"
870
+ ],
871
+ "title": "Object",
872
+ "default": "completion"
873
+ },
874
+ "created": {
875
+ "type": "integer",
876
+ "title": "Created",
877
+ "examples": [
878
+ 1623340000
879
+ ]
880
+ },
881
+ "model": {
882
+ "const": "private-gpt",
883
+ "title": "Model"
884
+ },
885
+ "choices": {
886
+ "items": {
887
+ "$ref": "#/components/schemas/OpenAIChoice"
888
+ },
889
+ "type": "array",
890
+ "title": "Choices"
891
+ }
892
+ },
893
+ "type": "object",
894
+ "required": [
895
+ "id",
896
+ "created",
897
+ "model",
898
+ "choices"
899
+ ],
900
+ "title": "OpenAICompletion",
901
+ "description": "Clone of OpenAI Completion model.\n\nFor more information see: https://platform.openai.com/docs/api-reference/chat/object"
902
+ },
903
+ "OpenAIDelta": {
904
+ "properties": {
905
+ "content": {
906
+ "anyOf": [
907
+ {
908
+ "type": "string"
909
+ },
910
+ {
911
+ "type": "null"
912
+ }
913
+ ],
914
+ "title": "Content"
915
+ }
916
+ },
917
+ "type": "object",
918
+ "required": [
919
+ "content"
920
+ ],
921
+ "title": "OpenAIDelta",
922
+ "description": "A piece of completion that needs to be concatenated to get the full message."
923
+ },
924
+ "OpenAIMessage": {
925
+ "properties": {
926
+ "role": {
927
+ "type": "string",
928
+ "enum": [
929
+ "assistant",
930
+ "system",
931
+ "user"
932
+ ],
933
+ "title": "Role",
934
+ "default": "user"
935
+ },
936
+ "content": {
937
+ "anyOf": [
938
+ {
939
+ "type": "string"
940
+ },
941
+ {
942
+ "type": "null"
943
+ }
944
+ ],
945
+ "title": "Content"
946
+ }
947
+ },
948
+ "type": "object",
949
+ "required": [
950
+ "content"
951
+ ],
952
+ "title": "OpenAIMessage",
953
+ "description": "Inference result, with the source of the message.\n\nRole could be the assistant or system\n(providing a default response, not AI generated)."
954
+ },
955
+ "ValidationError": {
956
+ "properties": {
957
+ "loc": {
958
+ "items": {
959
+ "anyOf": [
960
+ {
961
+ "type": "string"
962
+ },
963
+ {
964
+ "type": "integer"
965
+ }
966
+ ]
967
+ },
968
+ "type": "array",
969
+ "title": "Location"
970
+ },
971
+ "msg": {
972
+ "type": "string",
973
+ "title": "Message"
974
+ },
975
+ "type": {
976
+ "type": "string",
977
+ "title": "Error Type"
978
+ }
979
+ },
980
+ "type": "object",
981
+ "required": [
982
+ "loc",
983
+ "msg",
984
+ "type"
985
+ ],
986
+ "title": "ValidationError"
987
+ }
988
+ }
989
+ },
990
+ "tags": [
991
+ {
992
+ "name": "Ingestion",
993
+ "description": "High-level APIs covering document ingestion -internally managing document parsing, splitting,metadata extraction, embedding generation and storage- and ingested documents CRUD.Each ingested document is identified by an ID that can be used to filter the contextused in *Contextual Completions* and *Context Chunks* APIs."
994
+ },
995
+ {
996
+ "name": "Contextual Completions",
997
+ "description": "High-level APIs covering contextual Chat and Completions. They follow OpenAI's format, extending it to allow using the context coming from ingested documents to create the response. Internallymanage context retrieval, prompt engineering and the response generation."
998
+ },
999
+ {
1000
+ "name": "Context Chunks",
1001
+ "description": "Low-level API that given a query return relevant chunks of text coming from the ingesteddocuments."
1002
+ },
1003
+ {
1004
+ "name": "Embeddings",
1005
+ "description": "Low-level API to obtain the vector representation of a given text, using an Embeddings model.Follows OpenAI's embeddings API format."
1006
+ },
1007
+ {
1008
+ "name": "Health",
1009
+ "description": "Simple health API to make sure the server is up and running."
1010
+ }
1011
+ ]
1012
+ }
local_data/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *
2
+ !.gitignore
local_data/private_gpt/docstore.json ADDED
The diff for this file is too large to render. See raw diff
 
local_data/private_gpt/graph_store.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"graph_dict": {}}
local_data/private_gpt/index_store.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"index_store/data": {"cbc1d1a7-f418-47a5-b795-e18680c281a3": {"__type__": "vector_store", "__data__": "{\"index_id\": \"cbc1d1a7-f418-47a5-b795-e18680c281a3\", \"summary\": null, \"nodes_dict\": {\"4aa647b2-2bcd-42d1-9f75-003fb6d00a68\": \"4aa647b2-2bcd-42d1-9f75-003fb6d00a68\", \"9bf097dd-1a34-46ef-9b61-aad8eb7eb232\": \"9bf097dd-1a34-46ef-9b61-aad8eb7eb232\", \"8b610fd6-7e61-427d-b0fe-7c3bf852962d\": \"8b610fd6-7e61-427d-b0fe-7c3bf852962d\", \"b088df32-24ae-4de7-94fb-93e6b66c6033\": \"b088df32-24ae-4de7-94fb-93e6b66c6033\", \"9ed279dc-e305-4d87-887e-3bdadd545cb9\": \"9ed279dc-e305-4d87-887e-3bdadd545cb9\", \"d4b2b46e-2bb9-4ab4-b573-73838af88192\": \"d4b2b46e-2bb9-4ab4-b573-73838af88192\", \"832ebd8c-769d-466b-ab60-cd790f8e3550\": \"832ebd8c-769d-466b-ab60-cd790f8e3550\", \"2718b9a4-e30f-4e4d-b096-ebdf9efc6f30\": \"2718b9a4-e30f-4e4d-b096-ebdf9efc6f30\", \"b5a3f1ce-dfc8-40aa-819e-1c93dcb3c549\": \"b5a3f1ce-dfc8-40aa-819e-1c93dcb3c549\", \"875c7c03-52f2-4eb6-9b74-e2fcf954c042\": \"875c7c03-52f2-4eb6-9b74-e2fcf954c042\", \"76f31973-ae09-464e-b789-d664a7b74bac\": \"76f31973-ae09-464e-b789-d664a7b74bac\", \"74b0560a-29cf-42a6-86c0-55ddb56d5e9c\": \"74b0560a-29cf-42a6-86c0-55ddb56d5e9c\", \"4828767f-396a-4ae7-a317-5be800ad8cee\": \"4828767f-396a-4ae7-a317-5be800ad8cee\", \"26a37355-9073-432a-8325-d3733769e4f1\": \"26a37355-9073-432a-8325-d3733769e4f1\", \"bc737f1d-a3f6-49f0-aff8-0b83215e4d03\": \"bc737f1d-a3f6-49f0-aff8-0b83215e4d03\", \"2c308184-183c-4c74-abd2-1a872e1a5983\": \"2c308184-183c-4c74-abd2-1a872e1a5983\", \"1ecbacfc-e440-40f6-8b7c-58e7f4430263\": \"1ecbacfc-e440-40f6-8b7c-58e7f4430263\", \"a84958e5-bbca-40de-bade-ad5d11320792\": \"a84958e5-bbca-40de-bade-ad5d11320792\", \"b7b5f86c-8904-4d52-b024-5c04c86780d2\": \"b7b5f86c-8904-4d52-b024-5c04c86780d2\", \"13494a4c-0324-4416-b03a-337a7dc1c76b\": \"13494a4c-0324-4416-b03a-337a7dc1c76b\", \"2740ef47-e9c7-4a5c-b6ce-dfb7e239f274\": \"2740ef47-e9c7-4a5c-b6ce-dfb7e239f274\", \"f9afaaa7-0487-4426-9f43-3c002db815b4\": \"f9afaaa7-0487-4426-9f43-3c002db815b4\", \"88a97d57-ef95-413a-acfc-6b167a994455\": \"88a97d57-ef95-413a-acfc-6b167a994455\", \"dcbddcca-91d1-48bf-8b3f-b414db2fdfea\": \"dcbddcca-91d1-48bf-8b3f-b414db2fdfea\", \"07cd0333-976f-4256-805e-68442c8896f3\": \"07cd0333-976f-4256-805e-68442c8896f3\", \"26763fc3-940a-45fe-80eb-2d6911758da9\": \"26763fc3-940a-45fe-80eb-2d6911758da9\", \"c540b737-2679-4aaa-a801-621ca99869fd\": \"c540b737-2679-4aaa-a801-621ca99869fd\", \"65506434-743b-4efe-a798-570d825d90e5\": \"65506434-743b-4efe-a798-570d825d90e5\", \"2c9b6a28-397f-4def-a2ef-1914363194d1\": \"2c9b6a28-397f-4def-a2ef-1914363194d1\", \"9578196c-027d-4d45-9671-7aefcd321d26\": \"9578196c-027d-4d45-9671-7aefcd321d26\", \"7495270a-b0a9-4bab-96f3-da7e66e1b8f3\": \"7495270a-b0a9-4bab-96f3-da7e66e1b8f3\", \"20d2318b-b9ab-41d0-9b97-64c6c3c26aa9\": \"20d2318b-b9ab-41d0-9b97-64c6c3c26aa9\", \"37b9db24-ddfa-423b-912a-ffc7fbe83847\": \"37b9db24-ddfa-423b-912a-ffc7fbe83847\", \"ecf9117d-66a4-443b-a571-02efd059827d\": \"ecf9117d-66a4-443b-a571-02efd059827d\", \"2a50f01a-b552-447a-b93f-c2a113e87bb0\": \"2a50f01a-b552-447a-b93f-c2a113e87bb0\", \"0acf0dc1-f520-44bc-9dfe-b76af39c3667\": \"0acf0dc1-f520-44bc-9dfe-b76af39c3667\", \"04377eda-8915-49f4-85ec-e06de2108bdc\": \"04377eda-8915-49f4-85ec-e06de2108bdc\", \"23386198-87d1-4f74-9e19-d6c7a18fd1de\": \"23386198-87d1-4f74-9e19-d6c7a18fd1de\", \"bca1fb8b-a7ef-4687-a85a-f7c4969b8557\": \"bca1fb8b-a7ef-4687-a85a-f7c4969b8557\", \"5e90c533-8419-49ad-931b-fcb513eaf397\": \"5e90c533-8419-49ad-931b-fcb513eaf397\", \"10203948-ed29-40f6-821a-6ca03dbe07b6\": \"10203948-ed29-40f6-821a-6ca03dbe07b6\", \"9e8d185e-0ca8-47b9-8003-4f30fa88b888\": \"9e8d185e-0ca8-47b9-8003-4f30fa88b888\", \"f6f9497b-06b8-4776-9c86-9818419b778a\": \"f6f9497b-06b8-4776-9c86-9818419b778a\", \"7c3b610d-68da-46f7-9680-67c7cb5f9fe2\": \"7c3b610d-68da-46f7-9680-67c7cb5f9fe2\", \"79f9fc25-82b4-445f-9a24-0bce12bdec2d\": \"79f9fc25-82b4-445f-9a24-0bce12bdec2d\", \"e7fed734-eda8-4e9b-8db8-cfeeb93b2714\": \"e7fed734-eda8-4e9b-8db8-cfeeb93b2714\", \"6a5e2b7a-5212-4096-8e86-6736641fbd63\": \"6a5e2b7a-5212-4096-8e86-6736641fbd63\", \"2b5c03fc-4aee-45bc-bf30-f748eb040bba\": \"2b5c03fc-4aee-45bc-bf30-f748eb040bba\", \"ba55488d-85b4-4c9d-9cd2-bc465f4ef1ba\": \"ba55488d-85b4-4c9d-9cd2-bc465f4ef1ba\", \"f994e530-0a41-476b-9f94-279c51e851c3\": \"f994e530-0a41-476b-9f94-279c51e851c3\", \"e0806a92-067d-4401-afa9-1e143b8ca059\": \"e0806a92-067d-4401-afa9-1e143b8ca059\", \"6abeddd5-771d-45ad-985c-b5039f9682eb\": \"6abeddd5-771d-45ad-985c-b5039f9682eb\", \"e964a0b1-a75b-4a10-a0ac-4a4a8b0e9730\": \"e964a0b1-a75b-4a10-a0ac-4a4a8b0e9730\", \"09aba15c-8848-4b1d-80d0-fd51aae4770e\": \"09aba15c-8848-4b1d-80d0-fd51aae4770e\", \"f2731479-2d76-4f37-85d6-4a1261989587\": \"f2731479-2d76-4f37-85d6-4a1261989587\", \"7f19d8ea-707a-4e49-8493-7c5dcab97c88\": \"7f19d8ea-707a-4e49-8493-7c5dcab97c88\", \"2f9b4a5d-2e04-4c12-bd0e-803a8f375470\": \"2f9b4a5d-2e04-4c12-bd0e-803a8f375470\", \"e3b61425-69ba-4332-a437-303643e57eb5\": \"e3b61425-69ba-4332-a437-303643e57eb5\", \"1fcfe884-f810-46de-a946-090c3c284ad0\": \"1fcfe884-f810-46de-a946-090c3c284ad0\", \"f5240473-1e46-4222-905c-b6b7cd4646ba\": \"f5240473-1e46-4222-905c-b6b7cd4646ba\", \"2c419b82-4f82-496f-b4b4-c76141274585\": \"2c419b82-4f82-496f-b4b4-c76141274585\", \"9fde07da-cd24-4978-a089-d1c54d402ddc\": \"9fde07da-cd24-4978-a089-d1c54d402ddc\", \"1305cef8-8cbd-46b6-b75c-2b7af7d6d1e4\": \"1305cef8-8cbd-46b6-b75c-2b7af7d6d1e4\", \"350d2b4c-6fbc-4cc5-a74e-4fc9bdc75a98\": \"350d2b4c-6fbc-4cc5-a74e-4fc9bdc75a98\", \"ac1e6e13-f279-4928-a284-0c92b66f09ae\": \"ac1e6e13-f279-4928-a284-0c92b66f09ae\", \"6f5f6064-4f8e-4caf-899c-fd78a65e466b\": \"6f5f6064-4f8e-4caf-899c-fd78a65e466b\", \"1b82111e-b71b-4b1b-b8cf-a8245da5ccf2\": \"1b82111e-b71b-4b1b-b8cf-a8245da5ccf2\", \"e8234cac-7fe1-411d-80d9-d1c9990edf1f\": \"e8234cac-7fe1-411d-80d9-d1c9990edf1f\", \"5bda07e1-5114-4f2f-9950-844cbe4dc5ff\": \"5bda07e1-5114-4f2f-9950-844cbe4dc5ff\", \"2e331ad1-4c67-4d7e-99f8-90636e796855\": \"2e331ad1-4c67-4d7e-99f8-90636e796855\", \"04a79d62-85c8-4e48-9cfe-055bcb7584ee\": \"04a79d62-85c8-4e48-9cfe-055bcb7584ee\", \"2715f5d1-3033-4068-98a5-da3aeaea645c\": \"2715f5d1-3033-4068-98a5-da3aeaea645c\", \"5472ba7c-8a73-4b3d-9c20-8e8a29b22c4c\": \"5472ba7c-8a73-4b3d-9c20-8e8a29b22c4c\", \"345e778e-a465-4e56-b4a4-79ec02fc488b\": \"345e778e-a465-4e56-b4a4-79ec02fc488b\", \"d991d1dd-c851-4eca-9ed5-0ffb73441b06\": \"d991d1dd-c851-4eca-9ed5-0ffb73441b06\", \"18e0b32b-51f2-4e6e-95ad-3ce5159c82b7\": \"18e0b32b-51f2-4e6e-95ad-3ce5159c82b7\", \"106db2bc-825f-431d-9559-6e1740e5cd7c\": \"106db2bc-825f-431d-9559-6e1740e5cd7c\", \"24100721-d6cd-4dfe-b050-30f50e640ba7\": \"24100721-d6cd-4dfe-b050-30f50e640ba7\", \"d7017230-d8ce-4c69-8739-0d8ec4f96977\": \"d7017230-d8ce-4c69-8739-0d8ec4f96977\", \"5f052ab6-717b-424b-b359-0adeb5aaa264\": \"5f052ab6-717b-424b-b359-0adeb5aaa264\", \"83846ec5-23a4-4df8-a302-57557e7892f0\": \"83846ec5-23a4-4df8-a302-57557e7892f0\", \"080d0243-4bdc-4328-b9db-6d34dce3f1f8\": \"080d0243-4bdc-4328-b9db-6d34dce3f1f8\", \"bbf248aa-e49f-4f76-85bc-4c70c513eb71\": \"bbf248aa-e49f-4f76-85bc-4c70c513eb71\", \"c2f3d877-ab48-4be7-8373-d67d10c89cc6\": \"c2f3d877-ab48-4be7-8373-d67d10c89cc6\", \"a2d60074-833a-4715-87ee-0424f4dfb3a4\": \"a2d60074-833a-4715-87ee-0424f4dfb3a4\", \"579f096b-8450-4b53-b5e0-2bb0cb4a3b8e\": \"579f096b-8450-4b53-b5e0-2bb0cb4a3b8e\", \"18aef834-588b-46cd-b2ee-7bc4c8e8b7bc\": \"18aef834-588b-46cd-b2ee-7bc4c8e8b7bc\", \"bf20e12a-1f22-4924-bbb5-e54f0067adb0\": \"bf20e12a-1f22-4924-bbb5-e54f0067adb0\", \"2bd1e53a-5f94-474c-a4c9-a5386d802273\": \"2bd1e53a-5f94-474c-a4c9-a5386d802273\", \"47f10038-136b-4508-9c04-982528ca1633\": \"47f10038-136b-4508-9c04-982528ca1633\", \"d651c02d-b2cc-421d-8431-3af058a15ee0\": \"d651c02d-b2cc-421d-8431-3af058a15ee0\", \"ce817407-6bf2-4805-8293-675ef161ed68\": \"ce817407-6bf2-4805-8293-675ef161ed68\", \"253ca4b8-5bef-420a-8a05-9974885ce61a\": \"253ca4b8-5bef-420a-8a05-9974885ce61a\", \"c0c6ff0e-1544-4aa1-a58b-dcc6c52c62a0\": \"c0c6ff0e-1544-4aa1-a58b-dcc6c52c62a0\", \"fe88573a-4a61-4bd7-a697-1d9100f205dc\": \"fe88573a-4a61-4bd7-a697-1d9100f205dc\", \"b309486c-2d0c-4225-91b1-6aa14b17c1e3\": \"b309486c-2d0c-4225-91b1-6aa14b17c1e3\", \"56358d3b-53f0-4f3e-a06e-75c9b4cf1fea\": \"56358d3b-53f0-4f3e-a06e-75c9b4cf1fea\", \"432d8ff8-91a4-4ef8-9197-69b4ffea9a7e\": \"432d8ff8-91a4-4ef8-9197-69b4ffea9a7e\", \"77073c38-3d34-4b87-909c-b16142a610f0\": \"77073c38-3d34-4b87-909c-b16142a610f0\", \"ea59cd80-80fd-45b8-8ad3-3ffb6394fc3b\": \"ea59cd80-80fd-45b8-8ad3-3ffb6394fc3b\", \"71534514-ce51-4219-baa4-3bdc0bf2a7b1\": \"71534514-ce51-4219-baa4-3bdc0bf2a7b1\", \"47308108-c00d-4e76-ac1e-1a751fee7390\": \"47308108-c00d-4e76-ac1e-1a751fee7390\", \"6d85b210-c296-4a51-a994-39ed27d505ff\": \"6d85b210-c296-4a51-a994-39ed27d505ff\", \"1bdcfb2f-10e8-498c-8e43-8f157e1d8fe0\": \"1bdcfb2f-10e8-498c-8e43-8f157e1d8fe0\", \"afc8e44b-cbe1-4aa8-b14f-c0a3a3a57589\": \"afc8e44b-cbe1-4aa8-b14f-c0a3a3a57589\", \"89e19391-1500-4af4-bbac-7611c7416784\": \"89e19391-1500-4af4-bbac-7611c7416784\", \"ede91f75-ebe7-4b86-baa4-a6ec6018b538\": \"ede91f75-ebe7-4b86-baa4-a6ec6018b538\", \"f82d22d1-316f-4b18-807a-924dd2fab1ed\": \"f82d22d1-316f-4b18-807a-924dd2fab1ed\", \"cf0b8afe-a302-4034-a8a2-b14d7a56b635\": \"cf0b8afe-a302-4034-a8a2-b14d7a56b635\", \"66097377-c9fb-48a9-8223-b9325ecbaa25\": \"66097377-c9fb-48a9-8223-b9325ecbaa25\", \"1f738b02-b8e1-4de2-b537-96b2f5f6e24c\": \"1f738b02-b8e1-4de2-b537-96b2f5f6e24c\", \"bef86ef8-4999-42d5-a507-8d8f37263d9f\": \"bef86ef8-4999-42d5-a507-8d8f37263d9f\", \"3ca4c88a-c14e-4139-80f9-693e3e64abc8\": \"3ca4c88a-c14e-4139-80f9-693e3e64abc8\", \"42616556-b70f-4166-96d3-b2f2c62e1004\": \"42616556-b70f-4166-96d3-b2f2c62e1004\", \"8530fe78-89ba-45f6-bd75-acaf32293ca2\": \"8530fe78-89ba-45f6-bd75-acaf32293ca2\", \"7ac37dcd-cac1-48db-aba7-a6a821234745\": \"7ac37dcd-cac1-48db-aba7-a6a821234745\", \"82680df8-e08e-4b91-8ddd-6d349e4c5705\": \"82680df8-e08e-4b91-8ddd-6d349e4c5705\", \"9e8028d9-2d6e-4ad8-9652-401ba37f754d\": \"9e8028d9-2d6e-4ad8-9652-401ba37f754d\", \"034b01ea-42bf-4c6a-971e-5341e4263b77\": \"034b01ea-42bf-4c6a-971e-5341e4263b77\", \"3de386a0-191f-4355-b5a6-41c5deb75a50\": \"3de386a0-191f-4355-b5a6-41c5deb75a50\", \"ed1d808f-3af2-4494-8d50-bfb5b986fd72\": \"ed1d808f-3af2-4494-8d50-bfb5b986fd72\", \"427083ea-5cd2-4687-884b-e27727bc603b\": \"427083ea-5cd2-4687-884b-e27727bc603b\", \"d54b86e0-e7ab-4346-800b-d613e9ee8bbc\": \"d54b86e0-e7ab-4346-800b-d613e9ee8bbc\", \"c3d09c63-cedd-48e4-abee-e2f4065b24ab\": \"c3d09c63-cedd-48e4-abee-e2f4065b24ab\", \"b14fd0da-92e7-4277-b8fa-7b62160fb6e9\": \"b14fd0da-92e7-4277-b8fa-7b62160fb6e9\", \"9257befb-5502-49e9-9a18-64a47c3bd267\": \"9257befb-5502-49e9-9a18-64a47c3bd267\", \"13c267a0-e573-40a6-a7b4-dff10708e83f\": \"13c267a0-e573-40a6-a7b4-dff10708e83f\", \"48cf3606-fa3d-4300-beff-779408dd78b4\": \"48cf3606-fa3d-4300-beff-779408dd78b4\", \"c927e56c-e1b4-4c3b-a7c5-b8b1bfb874b3\": \"c927e56c-e1b4-4c3b-a7c5-b8b1bfb874b3\", \"51055fb7-b0a6-4c54-b5c6-e947bc8662ba\": \"51055fb7-b0a6-4c54-b5c6-e947bc8662ba\", \"610ef6e2-f0b5-4cfc-a801-3c0561364c39\": \"610ef6e2-f0b5-4cfc-a801-3c0561364c39\", \"77744220-3445-4612-9666-4925739733eb\": \"77744220-3445-4612-9666-4925739733eb\", \"2df03af1-4f12-444e-a6fe-2c4713138d17\": \"2df03af1-4f12-444e-a6fe-2c4713138d17\", \"5da5f5e4-dda0-49e3-b3b2-e70bbb819ca9\": \"5da5f5e4-dda0-49e3-b3b2-e70bbb819ca9\", \"b424dd93-ebd0-49de-be22-4de534d02f37\": \"b424dd93-ebd0-49de-be22-4de534d02f37\", \"fc9e04b0-61fb-481c-af29-b5bdb89b0cc6\": \"fc9e04b0-61fb-481c-af29-b5bdb89b0cc6\", \"089da9b0-2701-48dd-954b-346b7e3bdcc3\": \"089da9b0-2701-48dd-954b-346b7e3bdcc3\", \"3b9086fa-00f2-410e-a25d-beea94b84611\": \"3b9086fa-00f2-410e-a25d-beea94b84611\", \"5f75a35a-64e3-4504-a024-c2f8e0a71acc\": \"5f75a35a-64e3-4504-a024-c2f8e0a71acc\", \"a4fff09d-9522-4478-9af1-0b504fa4c8ee\": \"a4fff09d-9522-4478-9af1-0b504fa4c8ee\", \"9cbe439e-17ff-4956-9b1b-60467873986a\": \"9cbe439e-17ff-4956-9b1b-60467873986a\", \"7d66f518-2159-49aa-8012-6d62f52ad994\": \"7d66f518-2159-49aa-8012-6d62f52ad994\", \"3ac9c49e-8062-4406-b88b-1d61d2f729a7\": \"3ac9c49e-8062-4406-b88b-1d61d2f729a7\", \"da757de5-538d-4be4-b223-ec8234460492\": \"da757de5-538d-4be4-b223-ec8234460492\", \"a9038689-bae1-476d-8d32-1288a1dec308\": \"a9038689-bae1-476d-8d32-1288a1dec308\", \"c25cf3d9-8924-473a-ba31-59872ac40309\": \"c25cf3d9-8924-473a-ba31-59872ac40309\", \"afdc513d-db48-4fb2-9c1c-e05ef8fd3547\": \"afdc513d-db48-4fb2-9c1c-e05ef8fd3547\", \"679f356b-9f19-48a3-ab30-24ddcfc23d02\": \"679f356b-9f19-48a3-ab30-24ddcfc23d02\", \"464491e3-600f-4781-87f3-7ca2bf35cd8b\": \"464491e3-600f-4781-87f3-7ca2bf35cd8b\", \"255f4025-fa4a-4a8e-b28f-c7e0f93e2d71\": \"255f4025-fa4a-4a8e-b28f-c7e0f93e2d71\", \"12527123-5dd7-4c29-9d0a-fbf1348acb13\": \"12527123-5dd7-4c29-9d0a-fbf1348acb13\", \"c9ace8c7-095a-4acf-bfd3-31a80840043c\": \"c9ace8c7-095a-4acf-bfd3-31a80840043c\", \"23ca6a2c-b665-4136-8252-4e3511800cb2\": \"23ca6a2c-b665-4136-8252-4e3511800cb2\", \"c1bebdb1-8466-485e-ba32-c7f1768afb8f\": \"c1bebdb1-8466-485e-ba32-c7f1768afb8f\", \"0f73fd11-2c9c-4e6d-b14c-891759bb906c\": \"0f73fd11-2c9c-4e6d-b14c-891759bb906c\", \"928e1aee-8009-4b84-a2d4-04ce40ea2924\": \"928e1aee-8009-4b84-a2d4-04ce40ea2924\", \"ff509074-e8b6-4882-9f11-c685d7c5e74c\": \"ff509074-e8b6-4882-9f11-c685d7c5e74c\", \"494d5f9c-6173-419a-a5e7-0718065748c6\": \"494d5f9c-6173-419a-a5e7-0718065748c6\", \"76b88ceb-e411-49de-b15f-6194498df861\": \"76b88ceb-e411-49de-b15f-6194498df861\", \"6f7369ec-8025-4ce7-a191-15f01c233655\": \"6f7369ec-8025-4ce7-a191-15f01c233655\", \"c0481400-dd05-4a6a-baac-b40c6e8c1d50\": \"c0481400-dd05-4a6a-baac-b40c6e8c1d50\", \"2411ee9f-d339-4712-b254-e0d58f611514\": \"2411ee9f-d339-4712-b254-e0d58f611514\", \"275f8771-784e-42c2-92a3-09853c9cbb94\": \"275f8771-784e-42c2-92a3-09853c9cbb94\", \"de9a46c3-8a3e-48eb-a5e6-c57c2af0e9b5\": \"de9a46c3-8a3e-48eb-a5e6-c57c2af0e9b5\", \"74783f0c-6572-4511-bd4b-cc169d680860\": \"74783f0c-6572-4511-bd4b-cc169d680860\", \"8be9fef9-0ea5-49c1-80dc-d4479f9d6753\": \"8be9fef9-0ea5-49c1-80dc-d4479f9d6753\", \"73b11941-77cb-461f-8f5d-4c402a1e065d\": \"73b11941-77cb-461f-8f5d-4c402a1e065d\", \"d51c2989-6c02-4177-90f8-2621eb18f70e\": \"d51c2989-6c02-4177-90f8-2621eb18f70e\", \"c8da1a27-b4cb-45f6-ac61-b08a9efcb2db\": \"c8da1a27-b4cb-45f6-ac61-b08a9efcb2db\", \"d5be91d1-922b-4975-977a-e47014b14ab0\": \"d5be91d1-922b-4975-977a-e47014b14ab0\", \"aff522e6-fc31-44bc-aeaa-eb61b2c22633\": \"aff522e6-fc31-44bc-aeaa-eb61b2c22633\", \"5f89e89d-2ee3-41db-b518-29eaeda2f6e2\": \"5f89e89d-2ee3-41db-b518-29eaeda2f6e2\", \"3af9b6ee-156f-449c-81de-fa4f1496ea29\": \"3af9b6ee-156f-449c-81de-fa4f1496ea29\", \"b0ac8be0-ee3c-4bab-9768-1f8544bc9e81\": \"b0ac8be0-ee3c-4bab-9768-1f8544bc9e81\", \"8f042385-7543-4e74-a866-258cf19b4985\": \"8f042385-7543-4e74-a866-258cf19b4985\", \"20cff46b-ef04-4502-b3ed-ecd2d83b19e9\": \"20cff46b-ef04-4502-b3ed-ecd2d83b19e9\", \"b1169cf4-c1f1-43e4-ab90-b3842cccf809\": \"b1169cf4-c1f1-43e4-ab90-b3842cccf809\", \"06aa1f30-1513-480b-9263-22dec17c64c8\": \"06aa1f30-1513-480b-9263-22dec17c64c8\", \"4c798ae4-f706-434e-b4c7-4f9cae0cea02\": \"4c798ae4-f706-434e-b4c7-4f9cae0cea02\", \"30a6702a-c993-44e2-88e3-11b88eb70e4f\": \"30a6702a-c993-44e2-88e3-11b88eb70e4f\", \"441b10f3-90f4-4e9f-badd-47f978799cbf\": \"441b10f3-90f4-4e9f-badd-47f978799cbf\", \"9aa8a627-b1b9-46a5-ae82-401cee0b857b\": \"9aa8a627-b1b9-46a5-ae82-401cee0b857b\", \"d7467e86-7e7e-4647-b607-4a320c55fbc7\": \"d7467e86-7e7e-4647-b607-4a320c55fbc7\", \"3cc85d16-6d47-4c16-9310-4ec7cdd330bb\": \"3cc85d16-6d47-4c16-9310-4ec7cdd330bb\", \"2f97dad4-f806-4f54-b0c3-521606100285\": \"2f97dad4-f806-4f54-b0c3-521606100285\", \"06b8fd84-5eaf-4bb6-b5c8-fe6b760a4920\": \"06b8fd84-5eaf-4bb6-b5c8-fe6b760a4920\", \"95438b3d-056a-4a38-a4b4-0f62b9c28706\": \"95438b3d-056a-4a38-a4b4-0f62b9c28706\", \"c009c3e0-b9e5-456c-8895-e19854954589\": \"c009c3e0-b9e5-456c-8895-e19854954589\", \"f286142e-f068-438c-a8f6-3b7cfdcec0d8\": \"f286142e-f068-438c-a8f6-3b7cfdcec0d8\", \"b8d0019d-a626-4836-b618-610195f860f1\": \"b8d0019d-a626-4836-b618-610195f860f1\", \"cb652300-398b-4a0b-b978-2a2d5b581b94\": \"cb652300-398b-4a0b-b978-2a2d5b581b94\", \"4b325598-53f1-4cb8-bed2-43472c8c0654\": \"4b325598-53f1-4cb8-bed2-43472c8c0654\", \"daa9362f-78aa-4236-89ff-ef883e982820\": \"daa9362f-78aa-4236-89ff-ef883e982820\", \"732c918a-573a-480e-be35-3b8c19620029\": \"732c918a-573a-480e-be35-3b8c19620029\", \"7a3ce206-22e5-4ee4-90a7-16c2e039a1e9\": \"7a3ce206-22e5-4ee4-90a7-16c2e039a1e9\", \"c96879c8-0057-4738-80d7-d2849a61dc74\": \"c96879c8-0057-4738-80d7-d2849a61dc74\", \"329da4d1-09d4-4ad3-9d5e-516700e48816\": \"329da4d1-09d4-4ad3-9d5e-516700e48816\", \"474c0550-3a2d-4433-ac74-7e0918b96bd6\": \"474c0550-3a2d-4433-ac74-7e0918b96bd6\", \"e7d03d3f-5cbe-4436-a1fe-68405dcbb7ed\": \"e7d03d3f-5cbe-4436-a1fe-68405dcbb7ed\", \"0f278d1f-c471-4e27-a016-523cca2a2011\": \"0f278d1f-c471-4e27-a016-523cca2a2011\", \"a81bf711-6bbd-4f1f-8bd4-5d561dd651ea\": \"a81bf711-6bbd-4f1f-8bd4-5d561dd651ea\", \"a8e510c1-f8db-43ce-8163-191ce9dbe0c2\": \"a8e510c1-f8db-43ce-8163-191ce9dbe0c2\", \"e1f2c72b-5e53-4f1d-a706-f3247aea5665\": \"e1f2c72b-5e53-4f1d-a706-f3247aea5665\", \"8ecefd84-89cb-494e-8720-1428fd006450\": \"8ecefd84-89cb-494e-8720-1428fd006450\", \"e8d141bd-554e-4a56-8034-547983674384\": \"e8d141bd-554e-4a56-8034-547983674384\", \"08d037cd-c538-4814-b23b-abec75956eeb\": \"08d037cd-c538-4814-b23b-abec75956eeb\", \"5ea5119e-072c-43a4-bf0b-a30d69d61614\": \"5ea5119e-072c-43a4-bf0b-a30d69d61614\", \"276a10c7-9d8e-45e6-9563-696a487df770\": \"276a10c7-9d8e-45e6-9563-696a487df770\", \"9d9ea95d-ffc9-4e0e-982b-2e8eaa6d28aa\": \"9d9ea95d-ffc9-4e0e-982b-2e8eaa6d28aa\", \"02100ff2-5693-4c7b-9a36-4e90e119626b\": \"02100ff2-5693-4c7b-9a36-4e90e119626b\", \"9dc3ee47-839d-42ee-b7a5-195d0320473a\": \"9dc3ee47-839d-42ee-b7a5-195d0320473a\", \"0072630f-2f8e-4e95-b735-d99ca1e24f93\": \"0072630f-2f8e-4e95-b735-d99ca1e24f93\", \"498651a2-d1ea-49d5-ad79-0d8261d02d66\": \"498651a2-d1ea-49d5-ad79-0d8261d02d66\", \"de2bb666-475e-4ac7-8a74-f8190c53e3bd\": \"de2bb666-475e-4ac7-8a74-f8190c53e3bd\", \"ec0124b1-85ea-4d7d-b46b-4f10f2f92bbd\": \"ec0124b1-85ea-4d7d-b46b-4f10f2f92bbd\", \"7e0646c7-b68e-422f-b779-676e42230080\": \"7e0646c7-b68e-422f-b779-676e42230080\", \"8a445d02-4ef9-4ed7-9932-c4820fad81d0\": \"8a445d02-4ef9-4ed7-9932-c4820fad81d0\", \"5a6c28eb-8379-4b37-b9f6-4accc7efa41e\": \"5a6c28eb-8379-4b37-b9f6-4accc7efa41e\", \"14caea37-ee7b-44a5-b512-9faa84a17d91\": \"14caea37-ee7b-44a5-b512-9faa84a17d91\", \"c407a988-4ad3-4b26-b7dd-e833f7bea7b5\": \"c407a988-4ad3-4b26-b7dd-e833f7bea7b5\", \"8b9cfa6c-826c-48a4-8cea-d672b581651c\": \"8b9cfa6c-826c-48a4-8cea-d672b581651c\", \"a13dd20c-4dce-4fe9-a341-9a06671c50d3\": \"a13dd20c-4dce-4fe9-a341-9a06671c50d3\", \"4d706a21-ad40-4edd-bfb3-b6501a38e7cf\": \"4d706a21-ad40-4edd-bfb3-b6501a38e7cf\", \"f886a060-2717-410a-8357-46cb9b373441\": \"f886a060-2717-410a-8357-46cb9b373441\", \"9e1350fc-9d5a-438c-b6f1-d8d339f9f7a9\": \"9e1350fc-9d5a-438c-b6f1-d8d339f9f7a9\", \"d38f5d4d-1338-480c-9bc3-c46b70aa44ff\": \"d38f5d4d-1338-480c-9bc3-c46b70aa44ff\", \"c4496cc5-3ea6-4684-8a1b-7f81111ac418\": \"c4496cc5-3ea6-4684-8a1b-7f81111ac418\", \"c95affc4-9657-4cf0-aa11-160836f45bef\": \"c95affc4-9657-4cf0-aa11-160836f45bef\", \"8791d5f4-87af-470d-a241-7429f1682002\": \"8791d5f4-87af-470d-a241-7429f1682002\", \"e3ee8490-d895-44c6-a02d-ec4076b07423\": \"e3ee8490-d895-44c6-a02d-ec4076b07423\", \"4a19c04f-6222-4a70-aa78-0a41b117a98a\": \"4a19c04f-6222-4a70-aa78-0a41b117a98a\", \"1540b900-eb6d-4c64-9b79-3ebdb6382881\": \"1540b900-eb6d-4c64-9b79-3ebdb6382881\", \"cc928f43-ed37-42ce-ad06-9dc52be29b89\": \"cc928f43-ed37-42ce-ad06-9dc52be29b89\", \"6fafa2e5-6da6-467a-aea2-453aeafa8bd2\": \"6fafa2e5-6da6-467a-aea2-453aeafa8bd2\", \"02e510d2-4417-444e-96d1-708394524711\": \"02e510d2-4417-444e-96d1-708394524711\", \"1305a9a6-2840-4aff-ab75-7c780061df85\": \"1305a9a6-2840-4aff-ab75-7c780061df85\", \"639ee74a-9c31-422b-8ba8-d3d1fb751011\": \"639ee74a-9c31-422b-8ba8-d3d1fb751011\", \"69def097-1a2d-4a1d-815a-f6b361d41a1d\": \"69def097-1a2d-4a1d-815a-f6b361d41a1d\", \"e4152376-509c-43e0-983f-26c4704c661b\": \"e4152376-509c-43e0-983f-26c4704c661b\", \"f75e1eb4-8a1d-46bf-90bb-d69a417a7c25\": \"f75e1eb4-8a1d-46bf-90bb-d69a417a7c25\", \"ba2982cb-95f8-415e-9455-83cd9acd75fe\": \"ba2982cb-95f8-415e-9455-83cd9acd75fe\", \"e4410aaf-abb2-4a8d-bfea-f187562f2bd0\": \"e4410aaf-abb2-4a8d-bfea-f187562f2bd0\", \"5aa1408b-b07a-4aa1-8eea-bf887f5b89a3\": \"5aa1408b-b07a-4aa1-8eea-bf887f5b89a3\", \"87ed0d05-1512-412f-94e4-bfef37c5b2ba\": \"87ed0d05-1512-412f-94e4-bfef37c5b2ba\", \"fc32e430-36a5-4c79-9322-161ad16c6a38\": \"fc32e430-36a5-4c79-9322-161ad16c6a38\", \"56c16b6f-844b-4677-bc92-382812d4a5fd\": \"56c16b6f-844b-4677-bc92-382812d4a5fd\", \"5ccd8ee4-69c0-4922-b4a7-d8b2b147be81\": \"5ccd8ee4-69c0-4922-b4a7-d8b2b147be81\", \"6d861597-3dea-4599-8722-522a85f851bc\": \"6d861597-3dea-4599-8722-522a85f851bc\", \"8b76c49d-0855-4757-a225-fb12104684c0\": \"8b76c49d-0855-4757-a225-fb12104684c0\", \"ccf0b0d0-3a51-4a57-ae5c-ee790eaa0276\": \"ccf0b0d0-3a51-4a57-ae5c-ee790eaa0276\", \"0cf66ccc-9d9b-41ed-9059-9f3166ce7ba8\": \"0cf66ccc-9d9b-41ed-9059-9f3166ce7ba8\", \"05409e7b-3828-4a90-8ac6-5f1a971675e7\": \"05409e7b-3828-4a90-8ac6-5f1a971675e7\", \"eefa4bc9-4088-4277-a7a6-d02eb7aefa9e\": \"eefa4bc9-4088-4277-a7a6-d02eb7aefa9e\", \"4d4f1aac-9127-46c4-830b-0a632b765c55\": \"4d4f1aac-9127-46c4-830b-0a632b765c55\", \"a1cc0a3f-0fd5-4f58-b6fb-9d40d731ad13\": \"a1cc0a3f-0fd5-4f58-b6fb-9d40d731ad13\", \"90a20c13-3a5a-4ed8-9534-5f03f7b08c31\": \"90a20c13-3a5a-4ed8-9534-5f03f7b08c31\", \"375f3d44-baf3-4e91-aa24-d8bea56ec25a\": \"375f3d44-baf3-4e91-aa24-d8bea56ec25a\", \"706a5c3f-650a-48b0-8f97-31957f713ed4\": \"706a5c3f-650a-48b0-8f97-31957f713ed4\", \"999bc920-1006-4ea9-b1a0-7682ac468906\": \"999bc920-1006-4ea9-b1a0-7682ac468906\", \"65d92c4a-5a94-452b-9d27-48ace8068769\": \"65d92c4a-5a94-452b-9d27-48ace8068769\", \"a1b858d8-7454-4d72-937a-89d8b0cd3514\": \"a1b858d8-7454-4d72-937a-89d8b0cd3514\", \"286565bb-97e6-44ca-bffc-9d76a1504336\": \"286565bb-97e6-44ca-bffc-9d76a1504336\", \"05f08375-ea6d-4f8b-b937-e2c629034c8f\": \"05f08375-ea6d-4f8b-b937-e2c629034c8f\", \"82e0f725-a5e1-4358-8da3-f78e7eeea1c7\": \"82e0f725-a5e1-4358-8da3-f78e7eeea1c7\", \"8b65e748-db71-49e1-ae0d-0d4f5a5532f9\": \"8b65e748-db71-49e1-ae0d-0d4f5a5532f9\", \"24def6eb-8e69-4d9b-be39-bcfb7fadd1ad\": \"24def6eb-8e69-4d9b-be39-bcfb7fadd1ad\", \"3bce3dfa-7f5a-4656-b345-80227c0034b7\": \"3bce3dfa-7f5a-4656-b345-80227c0034b7\", \"f2da6d62-8c19-450c-a515-996c4d4d47d8\": \"f2da6d62-8c19-450c-a515-996c4d4d47d8\", \"6462c9de-5859-49b2-99eb-6a15229ab991\": \"6462c9de-5859-49b2-99eb-6a15229ab991\", \"2f02db3f-6bb8-4eb7-b1d6-49326cde7c5d\": \"2f02db3f-6bb8-4eb7-b1d6-49326cde7c5d\", \"e1293de6-79f5-4f45-95a9-d5a2127a2f48\": \"e1293de6-79f5-4f45-95a9-d5a2127a2f48\", \"99add419-66f8-4b9a-857e-cdeb93a95324\": \"99add419-66f8-4b9a-857e-cdeb93a95324\", \"8fe72806-0403-44e5-b6f0-72437e6f4297\": \"8fe72806-0403-44e5-b6f0-72437e6f4297\", \"beeb7bf2-8f14-4d7d-9176-c905856f6ce6\": \"beeb7bf2-8f14-4d7d-9176-c905856f6ce6\", \"8d489c1f-8825-44d5-a921-ce683df31c64\": \"8d489c1f-8825-44d5-a921-ce683df31c64\", \"97ad3b2a-bdb8-44ca-a429-cf323cc18abf\": \"97ad3b2a-bdb8-44ca-a429-cf323cc18abf\", \"5b385e2c-697d-4cbf-8c3f-ee5184205330\": \"5b385e2c-697d-4cbf-8c3f-ee5184205330\", \"b4713258-16c1-4a8c-9668-dbc45ec1e83e\": \"b4713258-16c1-4a8c-9668-dbc45ec1e83e\", \"3d906c4b-09ed-40d3-bc68-c1d0fd769e1a\": \"3d906c4b-09ed-40d3-bc68-c1d0fd769e1a\", \"75c34d7d-f772-4ab5-950d-6f5cc0ab5900\": \"75c34d7d-f772-4ab5-950d-6f5cc0ab5900\", \"70de6503-16bd-4c16-88d2-c2121d55b79b\": \"70de6503-16bd-4c16-88d2-c2121d55b79b\", \"f3cd3ffc-5ca1-4bfe-a1c5-c6bf51a7873a\": \"f3cd3ffc-5ca1-4bfe-a1c5-c6bf51a7873a\", \"f980eded-6546-4da7-a746-951dcee06c3d\": \"f980eded-6546-4da7-a746-951dcee06c3d\", \"fd7a80b0-fa9d-4b55-a6f3-8e8d334aecee\": \"fd7a80b0-fa9d-4b55-a6f3-8e8d334aecee\", \"00165cdc-765b-4ce5-906f-011f68d87357\": \"00165cdc-765b-4ce5-906f-011f68d87357\", \"116da362-b306-4a01-8b63-9ca90ed88538\": \"116da362-b306-4a01-8b63-9ca90ed88538\", \"f6720996-0050-41b2-978e-cd5d5b1c7351\": \"f6720996-0050-41b2-978e-cd5d5b1c7351\", \"f9f42492-39d1-40bb-8a3e-6d96b10cbda2\": \"f9f42492-39d1-40bb-8a3e-6d96b10cbda2\", \"63e6a09a-cce4-4aab-9e46-cae05495b3f3\": \"63e6a09a-cce4-4aab-9e46-cae05495b3f3\", \"c8fcefcc-dfa7-41fc-b950-a2a1e67344b6\": \"c8fcefcc-dfa7-41fc-b950-a2a1e67344b6\", \"29a716cc-b333-43a9-bd9d-3e739a6a6f38\": \"29a716cc-b333-43a9-bd9d-3e739a6a6f38\", \"785d28c3-cf93-4a75-a189-36ba85697e2a\": \"785d28c3-cf93-4a75-a189-36ba85697e2a\", \"bac11d45-c3c0-4ec7-8acf-1688137cf753\": \"bac11d45-c3c0-4ec7-8acf-1688137cf753\", \"94a125e4-583b-4d09-998c-6f7b4fec2aca\": \"94a125e4-583b-4d09-998c-6f7b4fec2aca\", \"d8e9d331-3eac-4338-8457-5347bb9d967e\": \"d8e9d331-3eac-4338-8457-5347bb9d967e\", \"7a66b2b0-429f-417a-9644-101f2360e5d3\": \"7a66b2b0-429f-417a-9644-101f2360e5d3\", \"1365ed79-7541-45ac-885e-f0a8ade8bfa0\": \"1365ed79-7541-45ac-885e-f0a8ade8bfa0\", \"29d68e17-7d77-4fc5-92d5-f86cd162066f\": \"29d68e17-7d77-4fc5-92d5-f86cd162066f\", \"5d1daf16-012e-48ea-bb39-132e8a0e5cef\": \"5d1daf16-012e-48ea-bb39-132e8a0e5cef\", \"58e345da-8dfc-478c-b6bc-857949b978fd\": \"58e345da-8dfc-478c-b6bc-857949b978fd\", \"d8bf818d-de82-42d4-a0fa-42c52c6c0311\": \"d8bf818d-de82-42d4-a0fa-42c52c6c0311\", \"17effb81-f60e-4b4c-83d5-8c34d5a20596\": \"17effb81-f60e-4b4c-83d5-8c34d5a20596\", \"c2372b8c-bdaf-4b84-b8bd-0b445d627758\": \"c2372b8c-bdaf-4b84-b8bd-0b445d627758\", \"7a0e1fab-2aa9-452d-92d0-aaabf2b064af\": \"7a0e1fab-2aa9-452d-92d0-aaabf2b064af\", \"f3133d5d-c651-4597-a0a7-22d8789e4670\": \"f3133d5d-c651-4597-a0a7-22d8789e4670\", \"57891ce2-32a1-44f0-8d7f-24b4f6b2806c\": \"57891ce2-32a1-44f0-8d7f-24b4f6b2806c\", \"bf8cab73-f2c8-4398-bdfc-dac7494e9c7e\": \"bf8cab73-f2c8-4398-bdfc-dac7494e9c7e\", \"8aad7c5c-cf6f-4ff5-80fd-dc9cbc9a4250\": \"8aad7c5c-cf6f-4ff5-80fd-dc9cbc9a4250\", \"1f33685d-5e46-4065-bdda-c5d1cf3c836e\": \"1f33685d-5e46-4065-bdda-c5d1cf3c836e\", \"43b9c0f1-8423-4a24-a2fe-4434daf2d75a\": \"43b9c0f1-8423-4a24-a2fe-4434daf2d75a\", \"ecc3483f-afda-484e-a108-f46b8a58a386\": \"ecc3483f-afda-484e-a108-f46b8a58a386\", \"085023e5-874a-4200-a199-df73a601a34d\": \"085023e5-874a-4200-a199-df73a601a34d\", \"f0ecf047-f69c-49d7-9482-44369e5d23f5\": \"f0ecf047-f69c-49d7-9482-44369e5d23f5\", \"63ce688e-1569-449a-accd-6a4f92779bfb\": \"63ce688e-1569-449a-accd-6a4f92779bfb\", \"9eee609a-8e10-4a48-86f1-0e87740ab06a\": \"9eee609a-8e10-4a48-86f1-0e87740ab06a\", \"f8ca29ac-60fc-47c2-a9ec-8e93bcda0598\": \"f8ca29ac-60fc-47c2-a9ec-8e93bcda0598\", \"bf305abc-a0fe-4e71-bcd9-7e4f50c89247\": \"bf305abc-a0fe-4e71-bcd9-7e4f50c89247\", \"c4765729-02a5-4597-bfcd-57f62dbd8701\": \"c4765729-02a5-4597-bfcd-57f62dbd8701\", \"bc230ea6-588e-4927-b6b3-4d3ccda9c6ef\": \"bc230ea6-588e-4927-b6b3-4d3ccda9c6ef\", \"54645dec-d5cf-4406-8519-2caf793a8d55\": \"54645dec-d5cf-4406-8519-2caf793a8d55\", \"2b7191fc-77a4-43e3-b69e-0120173a1ddf\": \"2b7191fc-77a4-43e3-b69e-0120173a1ddf\", \"b67e39a3-2f5e-4ef1-b716-07d219692b03\": \"b67e39a3-2f5e-4ef1-b716-07d219692b03\", \"203718f9-f181-48af-843d-32d463f4a412\": \"203718f9-f181-48af-843d-32d463f4a412\", \"9241ed6d-bc04-4f24-a195-3b27ac75f5e7\": \"9241ed6d-bc04-4f24-a195-3b27ac75f5e7\", \"08c2f405-2ef7-4881-9909-b74222a3fbcc\": \"08c2f405-2ef7-4881-9909-b74222a3fbcc\", \"648c429b-f7fe-4458-93cf-66c8c125639f\": \"648c429b-f7fe-4458-93cf-66c8c125639f\", \"0b65d9b4-7d7d-4f18-87fb-15c4543c81d9\": \"0b65d9b4-7d7d-4f18-87fb-15c4543c81d9\", \"a60b23ce-e7cc-4336-bb9c-debac1700529\": \"a60b23ce-e7cc-4336-bb9c-debac1700529\", \"fd20aac4-0a33-43a5-bdd1-16c3a6cc535c\": \"fd20aac4-0a33-43a5-bdd1-16c3a6cc535c\", \"d46c3f2a-a1b9-4d87-94df-504d42d8f00e\": \"d46c3f2a-a1b9-4d87-94df-504d42d8f00e\", \"9f65f32f-f262-4e36-b472-019405837437\": \"9f65f32f-f262-4e36-b472-019405837437\", \"9791c9dc-9a08-4018-b29c-e742960e0141\": \"9791c9dc-9a08-4018-b29c-e742960e0141\", \"753cfa89-dec1-4ecc-8d9a-0ec62f0290f0\": \"753cfa89-dec1-4ecc-8d9a-0ec62f0290f0\", \"87b726d8-91a8-4d85-854c-a41b637e133c\": \"87b726d8-91a8-4d85-854c-a41b637e133c\", \"a6e7c833-5f83-4448-84c6-4a659c803843\": \"a6e7c833-5f83-4448-84c6-4a659c803843\", \"d98827b7-94a1-4dff-a537-9b45a7f5232b\": \"d98827b7-94a1-4dff-a537-9b45a7f5232b\", \"e2435de1-589b-4f6d-9c4a-f96e20f058fc\": \"e2435de1-589b-4f6d-9c4a-f96e20f058fc\", \"bbe90f1c-132f-4a56-b528-07d0e66fc914\": \"bbe90f1c-132f-4a56-b528-07d0e66fc914\", \"66641c23-4def-4b61-8473-67323a1372ed\": \"66641c23-4def-4b61-8473-67323a1372ed\", \"e12f8265-0301-4266-a07d-df81002d2328\": \"e12f8265-0301-4266-a07d-df81002d2328\", \"d2dfe03a-ca03-41d4-a1ae-3a61424182b3\": \"d2dfe03a-ca03-41d4-a1ae-3a61424182b3\", \"99f0352b-240f-44d7-b74d-456e90db0a63\": \"99f0352b-240f-44d7-b74d-456e90db0a63\", \"dc87a74e-5142-4dd3-8797-e3235c902f29\": \"dc87a74e-5142-4dd3-8797-e3235c902f29\", \"3a1edd39-c69a-4587-939e-7d7698afa334\": \"3a1edd39-c69a-4587-939e-7d7698afa334\", \"d8f1a304-ede3-426d-ad3e-aafced4c4d11\": \"d8f1a304-ede3-426d-ad3e-aafced4c4d11\", \"c9ffce2f-fdd0-4098-8685-dc9bf0261883\": \"c9ffce2f-fdd0-4098-8685-dc9bf0261883\", \"bc837308-679b-4575-963a-690be2caa634\": \"bc837308-679b-4575-963a-690be2caa634\", \"e3917d84-eb21-4ed3-a124-b81b57e1b2c2\": \"e3917d84-eb21-4ed3-a124-b81b57e1b2c2\", \"16c787d1-e70f-418f-a066-07636d894505\": \"16c787d1-e70f-418f-a066-07636d894505\", \"79410707-4bb9-4fe3-b43b-b5d422f5356a\": \"79410707-4bb9-4fe3-b43b-b5d422f5356a\", \"1d294765-5d66-44bc-a87f-88e86b3660ce\": \"1d294765-5d66-44bc-a87f-88e86b3660ce\", \"724f5ba3-cb28-452e-86f2-095b6d97e3fd\": \"724f5ba3-cb28-452e-86f2-095b6d97e3fd\", \"dc89cc24-1635-4a30-be77-34a1af42904c\": \"dc89cc24-1635-4a30-be77-34a1af42904c\", \"77bd88a1-2bf2-4ec9-bf59-5ef03214e438\": \"77bd88a1-2bf2-4ec9-bf59-5ef03214e438\", \"2514b96f-7ceb-4548-b1ca-f2bc400a2407\": \"2514b96f-7ceb-4548-b1ca-f2bc400a2407\", \"714013ce-508a-4178-8b28-151587aa02a7\": \"714013ce-508a-4178-8b28-151587aa02a7\", \"177dc299-f92e-4a9d-b070-6a0b8a097a5f\": \"177dc299-f92e-4a9d-b070-6a0b8a097a5f\", \"9c2f8726-de3f-4de1-aaf2-f3f39903a8b1\": \"9c2f8726-de3f-4de1-aaf2-f3f39903a8b1\", \"e70347c1-8d10-4461-85a7-5be699b2f78d\": \"e70347c1-8d10-4461-85a7-5be699b2f78d\", \"4d33a4d4-1ab3-420a-a807-77fbd183e918\": \"4d33a4d4-1ab3-420a-a807-77fbd183e918\", \"977ac93c-dcd8-4eca-85f8-a2662eb38c6d\": \"977ac93c-dcd8-4eca-85f8-a2662eb38c6d\", \"f0a17810-6bc2-46f9-9a41-cd45146387e8\": \"f0a17810-6bc2-46f9-9a41-cd45146387e8\", \"a389b74d-a6d3-4625-a167-9b1c1ed22b3c\": \"a389b74d-a6d3-4625-a167-9b1c1ed22b3c\", \"409cc92e-464c-4dde-975a-d1215fbd5a5c\": \"409cc92e-464c-4dde-975a-d1215fbd5a5c\", \"30fdebdf-516d-48ff-86cf-bfaab3c3ae6d\": \"30fdebdf-516d-48ff-86cf-bfaab3c3ae6d\", \"2cd98cee-28f6-4a46-ac1f-119dbfe72253\": \"2cd98cee-28f6-4a46-ac1f-119dbfe72253\", \"64cd13c3-afaf-4ce1-8a02-b01610ff8064\": \"64cd13c3-afaf-4ce1-8a02-b01610ff8064\", \"646a7216-2de6-47cd-9da5-e43fdf153863\": \"646a7216-2de6-47cd-9da5-e43fdf153863\", \"69c1c1b8-81ad-408d-87ec-18378846ffbd\": \"69c1c1b8-81ad-408d-87ec-18378846ffbd\", \"1bdfa5f3-f984-44e4-b8c7-c7629d835d67\": \"1bdfa5f3-f984-44e4-b8c7-c7629d835d67\", \"b4272f78-47c9-4800-b59f-194275c2a3af\": \"b4272f78-47c9-4800-b59f-194275c2a3af\", \"293da2cb-41b3-4fa9-8298-6229a8d6d9f7\": \"293da2cb-41b3-4fa9-8298-6229a8d6d9f7\", \"083dd5a8-9d56-4fd2-a4f4-61cb51a81f1d\": \"083dd5a8-9d56-4fd2-a4f4-61cb51a81f1d\", \"7db7d3dc-5887-4e5d-b914-551d2639a122\": \"7db7d3dc-5887-4e5d-b914-551d2639a122\", \"4592e907-8966-4da4-b3e1-13dd886fce56\": \"4592e907-8966-4da4-b3e1-13dd886fce56\", \"72aba6b4-1ede-483b-9447-21a27d492e54\": \"72aba6b4-1ede-483b-9447-21a27d492e54\", \"93740952-7ce8-43e3-842e-db8c89ff265e\": \"93740952-7ce8-43e3-842e-db8c89ff265e\", \"3de60956-2b5d-4b72-9e4f-419786ed6de4\": \"3de60956-2b5d-4b72-9e4f-419786ed6de4\", \"7413076b-ec91-49b9-976d-595bacc50aef\": \"7413076b-ec91-49b9-976d-595bacc50aef\", \"9eabe137-3529-4319-93a1-8108b32b96f7\": \"9eabe137-3529-4319-93a1-8108b32b96f7\", \"4a93d207-dd6a-4048-92b1-6476196ba807\": \"4a93d207-dd6a-4048-92b1-6476196ba807\", \"f77ebba1-1721-4940-bcb2-f682d8dfab85\": \"f77ebba1-1721-4940-bcb2-f682d8dfab85\", \"00a1b3d9-a95c-4503-a484-4121b3286bee\": \"00a1b3d9-a95c-4503-a484-4121b3286bee\", \"bf9eabd6-e35a-4dbf-a5ad-2c3610508656\": \"bf9eabd6-e35a-4dbf-a5ad-2c3610508656\", \"28225bcc-12fb-4d78-8636-f61732c31b5f\": \"28225bcc-12fb-4d78-8636-f61732c31b5f\", \"4c63c4a5-b606-4b46-969b-655fc2f2065f\": \"4c63c4a5-b606-4b46-969b-655fc2f2065f\", \"6e8dc8b3-c7b4-4824-88ee-d2255f344963\": \"6e8dc8b3-c7b4-4824-88ee-d2255f344963\", \"8cd61283-b3a2-4e30-b074-30b96757e3cb\": \"8cd61283-b3a2-4e30-b074-30b96757e3cb\", \"8f6a2f4c-950b-499e-b593-a9b21954e938\": \"8f6a2f4c-950b-499e-b593-a9b21954e938\", \"515b26d0-017d-4538-ace9-2a33e1595b19\": \"515b26d0-017d-4538-ace9-2a33e1595b19\", \"6df56e9b-de15-4bbd-b39d-42da20d77446\": \"6df56e9b-de15-4bbd-b39d-42da20d77446\", \"9006df30-620e-4f43-92e4-0f5bf11e1d78\": \"9006df30-620e-4f43-92e4-0f5bf11e1d78\", \"a0b4415b-08fa-41ec-8cfa-cbce73491806\": \"a0b4415b-08fa-41ec-8cfa-cbce73491806\", \"65cf51ff-7dbe-46c3-9d05-c61bd83fc1ed\": \"65cf51ff-7dbe-46c3-9d05-c61bd83fc1ed\", \"b0fcf8a2-c0e4-4e72-8dbe-5782858352f6\": \"b0fcf8a2-c0e4-4e72-8dbe-5782858352f6\", \"3da3f87e-c670-44c9-800f-fe5dc2f19cfa\": \"3da3f87e-c670-44c9-800f-fe5dc2f19cfa\", \"386766c4-8654-41af-954d-7e93a2167f70\": \"386766c4-8654-41af-954d-7e93a2167f70\", \"d39ed896-48a3-4bd6-bf9a-39c4d50de442\": \"d39ed896-48a3-4bd6-bf9a-39c4d50de442\", \"f7867c13-c2ac-42ea-a00e-590713751cd0\": \"f7867c13-c2ac-42ea-a00e-590713751cd0\", \"a025dd2a-dacc-42ea-826e-de0c9b49bf18\": \"a025dd2a-dacc-42ea-826e-de0c9b49bf18\", \"70f84f63-3ea0-4143-86c1-2a8c5bba9a73\": \"70f84f63-3ea0-4143-86c1-2a8c5bba9a73\", \"9c1f7f0d-e761-4a89-a3d6-e8ef0dbafc77\": \"9c1f7f0d-e761-4a89-a3d6-e8ef0dbafc77\", \"a2ba7158-23a5-44ea-aaf6-ce6347b3570f\": \"a2ba7158-23a5-44ea-aaf6-ce6347b3570f\", \"0a0f1352-52c8-4923-b246-808106ab1e3c\": \"0a0f1352-52c8-4923-b246-808106ab1e3c\", \"5cc3c626-e526-4278-8966-67871da58de1\": \"5cc3c626-e526-4278-8966-67871da58de1\", \"79cbad7f-ddf4-400b-98b9-1a43457b9305\": \"79cbad7f-ddf4-400b-98b9-1a43457b9305\", \"6f3c2e7c-a885-40f5-87a7-9510dbdab4a7\": \"6f3c2e7c-a885-40f5-87a7-9510dbdab4a7\", \"4002194f-58eb-4396-94da-c2989c57c87c\": \"4002194f-58eb-4396-94da-c2989c57c87c\", \"6be42a29-eb9a-416a-96e6-6ed7a73abe67\": \"6be42a29-eb9a-416a-96e6-6ed7a73abe67\", \"aef387fe-9f00-493f-9a4a-92ef6b5be95e\": \"aef387fe-9f00-493f-9a4a-92ef6b5be95e\", \"6c82ee55-94f9-4445-bf23-dc7a2a6a395a\": \"6c82ee55-94f9-4445-bf23-dc7a2a6a395a\", \"5cfdc72f-44ab-4a3b-a8e2-fe3947539ada\": \"5cfdc72f-44ab-4a3b-a8e2-fe3947539ada\", \"5eb0aebd-f9ba-4fb3-a265-c59ffab89f24\": \"5eb0aebd-f9ba-4fb3-a265-c59ffab89f24\", \"1f72320b-2338-447a-b1ce-c42e60aa2f5b\": \"1f72320b-2338-447a-b1ce-c42e60aa2f5b\", \"14783564-1fdf-42e0-afc2-19b1a1032a09\": \"14783564-1fdf-42e0-afc2-19b1a1032a09\", \"1bab286e-0147-41ce-a5b4-13096c0434be\": \"1bab286e-0147-41ce-a5b4-13096c0434be\", \"e1d9f9dc-f710-4835-8f56-dfe018a8328f\": \"e1d9f9dc-f710-4835-8f56-dfe018a8328f\", \"4decafb4-16ce-4258-894b-dbb78124842b\": \"4decafb4-16ce-4258-894b-dbb78124842b\", \"5de01344-24ec-426a-a5a1-026ab9866710\": \"5de01344-24ec-426a-a5a1-026ab9866710\", \"74962a78-60ed-49e9-87f6-3ad2fd44a7dc\": \"74962a78-60ed-49e9-87f6-3ad2fd44a7dc\", \"ba0ae850-0e05-483c-b73b-8b42ed1cc248\": \"ba0ae850-0e05-483c-b73b-8b42ed1cc248\", \"4f5ca5b2-fadf-4278-90a2-f1c491d90706\": \"4f5ca5b2-fadf-4278-90a2-f1c491d90706\", \"0c44367d-7b8c-4232-bf4d-f4a7767ee3f1\": \"0c44367d-7b8c-4232-bf4d-f4a7767ee3f1\", \"3dd392ea-d0bc-465c-9fb9-3de0319811f1\": \"3dd392ea-d0bc-465c-9fb9-3de0319811f1\", \"95f30ff0-f47f-4fd8-81de-99a10686d7d2\": \"95f30ff0-f47f-4fd8-81de-99a10686d7d2\", \"69875d39-0933-4e28-880a-6590ba465c43\": \"69875d39-0933-4e28-880a-6590ba465c43\", \"5f769bc4-61f0-4b58-b454-615c82bcb039\": \"5f769bc4-61f0-4b58-b454-615c82bcb039\", \"f11428e2-b4a6-4b7a-bf8a-97bb4e1d32c0\": \"f11428e2-b4a6-4b7a-bf8a-97bb4e1d32c0\", \"737216ed-c07c-4049-9134-a34c8c4cf472\": \"737216ed-c07c-4049-9134-a34c8c4cf472\", \"83e3cd0c-26b9-42b7-9b2c-cfe1fe4e9f7a\": \"83e3cd0c-26b9-42b7-9b2c-cfe1fe4e9f7a\", \"8ee590ef-d228-4220-878f-aaf27b9395c7\": \"8ee590ef-d228-4220-878f-aaf27b9395c7\", \"e411e136-0b3b-407e-b265-99c95c3610e3\": \"e411e136-0b3b-407e-b265-99c95c3610e3\", \"73d66fb0-55e2-45d8-af34-16e854471bcf\": \"73d66fb0-55e2-45d8-af34-16e854471bcf\", \"441471e5-e26f-4f1b-8711-f8e270e5e9b5\": \"441471e5-e26f-4f1b-8711-f8e270e5e9b5\", \"be4a1dbe-dd07-4047-b022-97e99c40608e\": \"be4a1dbe-dd07-4047-b022-97e99c40608e\", \"b20e3641-17a5-42a9-816d-4f5ea34072e9\": \"b20e3641-17a5-42a9-816d-4f5ea34072e9\", \"abe05f1b-6d22-4868-82f5-af5ed94fcbdf\": \"abe05f1b-6d22-4868-82f5-af5ed94fcbdf\", \"eb7a9cac-1943-4f3a-a8a4-528815b4ad66\": \"eb7a9cac-1943-4f3a-a8a4-528815b4ad66\", \"36c3e911-07d5-4adc-ade4-4cca3b89784b\": \"36c3e911-07d5-4adc-ade4-4cca3b89784b\", \"5b8e2202-2300-4cac-905b-7dbe5f4b7e81\": \"5b8e2202-2300-4cac-905b-7dbe5f4b7e81\", \"dc897430-daff-4f45-83cc-4a7ef7dbf571\": \"dc897430-daff-4f45-83cc-4a7ef7dbf571\", \"5b9b0813-fc4c-495d-a4f4-f0f1850f19cc\": \"5b9b0813-fc4c-495d-a4f4-f0f1850f19cc\", \"a69e5a8c-9a09-4730-8fa2-d6391000283b\": \"a69e5a8c-9a09-4730-8fa2-d6391000283b\", \"972f85ec-ba34-4b4c-bb75-425f8328a112\": \"972f85ec-ba34-4b4c-bb75-425f8328a112\", \"9f2acf9d-de30-4340-a625-4e1de579099e\": \"9f2acf9d-de30-4340-a625-4e1de579099e\", \"5fb7152d-4df6-4a74-9b06-7c4e59635423\": \"5fb7152d-4df6-4a74-9b06-7c4e59635423\", \"a26a1046-a37f-44b7-b1cc-5b364de92307\": \"a26a1046-a37f-44b7-b1cc-5b364de92307\", \"68e69dda-875b-4f88-9894-60387b9ecf39\": \"68e69dda-875b-4f88-9894-60387b9ecf39\", \"91f0d751-73bf-406d-9f3b-5bb88615b284\": \"91f0d751-73bf-406d-9f3b-5bb88615b284\", \"1b0c844a-da2c-4e13-8a36-ac8ff8ed7ea9\": \"1b0c844a-da2c-4e13-8a36-ac8ff8ed7ea9\", \"790d77c9-1cbc-4bff-b693-ef2e6deece32\": \"790d77c9-1cbc-4bff-b693-ef2e6deece32\", \"97017fc9-883f-4e0a-bd1d-3201ba26743b\": \"97017fc9-883f-4e0a-bd1d-3201ba26743b\", \"c7d60546-fa1f-43ef-99e2-f47a9aa6a194\": \"c7d60546-fa1f-43ef-99e2-f47a9aa6a194\", \"cbf79179-1f64-45f2-b817-d1538f8116a5\": \"cbf79179-1f64-45f2-b817-d1538f8116a5\", \"63b14d03-f30c-4ae7-93d3-b097f26f5df3\": \"63b14d03-f30c-4ae7-93d3-b097f26f5df3\", \"1e6848cd-69ee-4e1f-8b8c-f5551e92d648\": \"1e6848cd-69ee-4e1f-8b8c-f5551e92d648\", \"4292a0a3-8108-44f3-8523-728b66cfb241\": \"4292a0a3-8108-44f3-8523-728b66cfb241\", \"edbf2b56-ad60-4f47-991d-ab4fe98381f7\": \"edbf2b56-ad60-4f47-991d-ab4fe98381f7\", \"5343cc47-3286-4789-bac0-8d2742697b44\": \"5343cc47-3286-4789-bac0-8d2742697b44\", \"8ef537eb-034e-41cc-9cd8-9f2e88001192\": \"8ef537eb-034e-41cc-9cd8-9f2e88001192\", \"2bf668cb-3cea-46b3-a5e7-b28e5319bf04\": \"2bf668cb-3cea-46b3-a5e7-b28e5319bf04\", \"38d2429d-16cb-46aa-9f45-a035dc6243a8\": \"38d2429d-16cb-46aa-9f45-a035dc6243a8\", \"ddf95a47-4064-42f5-bb8e-29f3876bdeee\": \"ddf95a47-4064-42f5-bb8e-29f3876bdeee\", \"8e5676d3-a029-477a-8141-54a150162ad5\": \"8e5676d3-a029-477a-8141-54a150162ad5\", \"f11b4391-8f99-43e7-9d4f-d576065d986b\": \"f11b4391-8f99-43e7-9d4f-d576065d986b\", \"7e8fbc7d-ddcc-4a6f-a9f7-753cf39ac7ba\": \"7e8fbc7d-ddcc-4a6f-a9f7-753cf39ac7ba\", \"a7bd30e9-b360-435d-af51-e134f71449c6\": \"a7bd30e9-b360-435d-af51-e134f71449c6\", \"492f8d8d-418f-4359-9646-0671ecd81a0e\": \"492f8d8d-418f-4359-9646-0671ecd81a0e\", \"5ecabaa0-43d4-4bae-9473-64ce3f957e02\": \"5ecabaa0-43d4-4bae-9473-64ce3f957e02\", \"afa84609-1657-4af3-a6cb-ca9a98fbcfd5\": \"afa84609-1657-4af3-a6cb-ca9a98fbcfd5\", \"e478aa92-7c27-43ad-8a76-5922e080eaca\": \"e478aa92-7c27-43ad-8a76-5922e080eaca\", \"0a99ea88-32a0-48cb-ba44-0312b17a6952\": \"0a99ea88-32a0-48cb-ba44-0312b17a6952\", \"435ab031-332b-4ffe-baae-a9fd1f628d42\": \"435ab031-332b-4ffe-baae-a9fd1f628d42\", \"c2f69f30-7241-462f-b5ef-5068418d7c21\": \"c2f69f30-7241-462f-b5ef-5068418d7c21\", \"0fae1471-18b6-4379-b766-596ab1c27a57\": \"0fae1471-18b6-4379-b766-596ab1c27a57\", \"3e01adc3-97c3-41b0-a8a5-7b13e8edccf2\": \"3e01adc3-97c3-41b0-a8a5-7b13e8edccf2\", \"6ce8dbe1-7edc-47af-ba15-e739d2ba1d4d\": \"6ce8dbe1-7edc-47af-ba15-e739d2ba1d4d\", \"744a513e-df03-4eca-8b14-bc342b40e2d8\": \"744a513e-df03-4eca-8b14-bc342b40e2d8\", \"740dbe6e-b64f-4406-b96f-34a96b8b9c44\": \"740dbe6e-b64f-4406-b96f-34a96b8b9c44\", \"a7582069-b5a6-406c-8b7f-40d1ecf5030c\": \"a7582069-b5a6-406c-8b7f-40d1ecf5030c\", \"62903189-ff34-416a-b9e4-67cd91fdd049\": \"62903189-ff34-416a-b9e4-67cd91fdd049\", \"c7f53ddb-7a11-454f-98b4-a371814b5047\": \"c7f53ddb-7a11-454f-98b4-a371814b5047\", \"b77db9bf-e17e-4af2-b241-a9cf6ba1b058\": \"b77db9bf-e17e-4af2-b241-a9cf6ba1b058\", \"a43b2900-7b92-40c3-ae2e-69387f349f26\": \"a43b2900-7b92-40c3-ae2e-69387f349f26\", \"bfef31a4-bbc8-415a-88a0-d2ef2bffb81e\": \"bfef31a4-bbc8-415a-88a0-d2ef2bffb81e\", \"3447dcfb-b79c-450f-8e74-5d4068bd816c\": \"3447dcfb-b79c-450f-8e74-5d4068bd816c\", \"4c458e23-0ac8-4058-89bf-3aff07661395\": \"4c458e23-0ac8-4058-89bf-3aff07661395\", \"b7e2a00d-9837-4537-bb23-2ca10344ac4f\": \"b7e2a00d-9837-4537-bb23-2ca10344ac4f\", \"a62695a1-9bd7-4ea6-a9d9-3ded0ef31948\": \"a62695a1-9bd7-4ea6-a9d9-3ded0ef31948\", \"06394856-8211-4dac-a95b-30479062ab38\": \"06394856-8211-4dac-a95b-30479062ab38\", \"34850369-81f1-4913-843d-4ba72cb9ddc9\": \"34850369-81f1-4913-843d-4ba72cb9ddc9\", \"4055c94c-1efd-425c-961c-938243925a8c\": \"4055c94c-1efd-425c-961c-938243925a8c\", \"60d5bba2-aa85-410a-850b-47e4190c0778\": \"60d5bba2-aa85-410a-850b-47e4190c0778\", \"8ec7a1f8-3b02-4c48-aa0e-67d4ac7e3420\": \"8ec7a1f8-3b02-4c48-aa0e-67d4ac7e3420\", \"137f8bc5-afb5-4e40-8913-84aee3e2d5c2\": \"137f8bc5-afb5-4e40-8913-84aee3e2d5c2\", \"2196c0f9-a857-47ad-bf41-bddb1b680025\": \"2196c0f9-a857-47ad-bf41-bddb1b680025\", \"a6baa05b-444e-46a0-b3a0-225ec2215e74\": \"a6baa05b-444e-46a0-b3a0-225ec2215e74\", \"d941f0e9-e48c-43ff-b739-5a9f59eafcbd\": \"d941f0e9-e48c-43ff-b739-5a9f59eafcbd\", \"ed5611de-350c-4f16-8c64-617c2a4bd876\": \"ed5611de-350c-4f16-8c64-617c2a4bd876\", \"8eb1beaf-1c9d-4e93-bc84-0894c8df850a\": \"8eb1beaf-1c9d-4e93-bc84-0894c8df850a\", \"d47cbb17-d384-4b63-91a0-f8bad1e03c4a\": \"d47cbb17-d384-4b63-91a0-f8bad1e03c4a\", \"d46b8379-34b0-44bd-9ba6-3987004972a8\": \"d46b8379-34b0-44bd-9ba6-3987004972a8\", \"cf9673ba-d816-4894-b63c-69ccab4d121c\": \"cf9673ba-d816-4894-b63c-69ccab4d121c\", \"58dba977-c5e9-45a1-b8d5-56f8a118b2e2\": \"58dba977-c5e9-45a1-b8d5-56f8a118b2e2\", \"1a062026-0144-43a6-a6ff-2c6566d04572\": \"1a062026-0144-43a6-a6ff-2c6566d04572\", \"b986eaf4-ad2b-4e10-a62a-1b06f7b6294a\": \"b986eaf4-ad2b-4e10-a62a-1b06f7b6294a\", \"f7c96823-4cec-4a54-87ca-85c1d7825c61\": \"f7c96823-4cec-4a54-87ca-85c1d7825c61\", \"3daebd93-33a0-4b4b-98aa-764e88e86137\": \"3daebd93-33a0-4b4b-98aa-764e88e86137\", \"05008152-1437-43d6-ad14-61b67efe4965\": \"05008152-1437-43d6-ad14-61b67efe4965\", \"ef1e512a-efdc-4d5a-acc7-190087f9d4a5\": \"ef1e512a-efdc-4d5a-acc7-190087f9d4a5\", \"975ebcc9-ddbd-4a55-a0ae-da14f41d4cc9\": \"975ebcc9-ddbd-4a55-a0ae-da14f41d4cc9\", \"2a1edb2a-3fa4-46b8-9f70-a0a9184b90ff\": \"2a1edb2a-3fa4-46b8-9f70-a0a9184b90ff\", \"d0b51c73-8741-49c4-9c00-187b8704b13b\": \"d0b51c73-8741-49c4-9c00-187b8704b13b\", \"31db50fb-ab26-4ecd-b326-73f723bc56fa\": \"31db50fb-ab26-4ecd-b326-73f723bc56fa\", \"aaf0380a-cb76-4ef7-9ceb-f93490dd66f0\": \"aaf0380a-cb76-4ef7-9ceb-f93490dd66f0\", \"ce535f6a-4c5e-430c-bf77-4bb294978c44\": \"ce535f6a-4c5e-430c-bf77-4bb294978c44\", \"3505ea08-0b5e-4ef2-89d9-138108b29d1b\": \"3505ea08-0b5e-4ef2-89d9-138108b29d1b\", \"92da1111-5ac9-41a0-bfb7-7627e5cb94a2\": \"92da1111-5ac9-41a0-bfb7-7627e5cb94a2\", \"7671a97f-fb50-459e-8567-5de47d11d78c\": \"7671a97f-fb50-459e-8567-5de47d11d78c\", \"6bf2f883-8a7d-437f-b565-cbb99dcd4d5d\": \"6bf2f883-8a7d-437f-b565-cbb99dcd4d5d\", \"8e2e9de0-d0e1-4cbe-8680-870337ea05b2\": \"8e2e9de0-d0e1-4cbe-8680-870337ea05b2\", \"8d821dbe-8006-440f-ac1d-aed49d71b7e7\": \"8d821dbe-8006-440f-ac1d-aed49d71b7e7\", \"4d091294-9816-4cf1-88da-3ce2815a7b4f\": \"4d091294-9816-4cf1-88da-3ce2815a7b4f\", \"a7e6270b-630c-4b55-9471-2fc7f0fd33cf\": \"a7e6270b-630c-4b55-9471-2fc7f0fd33cf\", \"6b7b868b-34a3-4128-88ba-bf7a9e187833\": \"6b7b868b-34a3-4128-88ba-bf7a9e187833\", \"e608f640-d4ac-414c-ae16-0967b35ea5a0\": \"e608f640-d4ac-414c-ae16-0967b35ea5a0\", \"4098601f-59b5-4f31-875f-801568e1f85c\": \"4098601f-59b5-4f31-875f-801568e1f85c\", \"f03b7316-c491-417d-9947-c56b8079ce52\": \"f03b7316-c491-417d-9947-c56b8079ce52\", \"8d615f3f-9349-4d04-a976-9355201c9a87\": \"8d615f3f-9349-4d04-a976-9355201c9a87\", \"e17559ec-1519-44f9-b3a9-007a890a9075\": \"e17559ec-1519-44f9-b3a9-007a890a9075\", \"a8ad0b5d-fcc9-4718-bc88-6d82450f9a40\": \"a8ad0b5d-fcc9-4718-bc88-6d82450f9a40\", \"ea64ef47-05f0-4dbf-aa2d-0bdae5120791\": \"ea64ef47-05f0-4dbf-aa2d-0bdae5120791\", \"c50b2d19-2dd9-4ceb-85c1-c09ce5872f8a\": \"c50b2d19-2dd9-4ceb-85c1-c09ce5872f8a\", \"fa308006-f3c6-4c00-90f0-529f79e7df06\": \"fa308006-f3c6-4c00-90f0-529f79e7df06\", \"00b29cae-c0f2-43ba-b9a4-99401d7a5ff4\": \"00b29cae-c0f2-43ba-b9a4-99401d7a5ff4\", \"b620053e-bdac-490b-a68c-ec2658cb24ac\": \"b620053e-bdac-490b-a68c-ec2658cb24ac\", \"0b7ac666-75f1-4630-ab3f-d07ed0143aec\": \"0b7ac666-75f1-4630-ab3f-d07ed0143aec\", \"6d312337-d00a-4ca4-876f-713f6b05247d\": \"6d312337-d00a-4ca4-876f-713f6b05247d\", \"a7c30c87-d70a-4ee4-9c5c-b123365bf6a3\": \"a7c30c87-d70a-4ee4-9c5c-b123365bf6a3\", \"1eb155f3-0d02-4801-8339-09ebf710968e\": \"1eb155f3-0d02-4801-8339-09ebf710968e\", \"9ce3ae74-8fe8-49d8-8e3e-a484f7079591\": \"9ce3ae74-8fe8-49d8-8e3e-a484f7079591\", \"5126b33b-3dd1-48ba-82e1-000a854537f0\": \"5126b33b-3dd1-48ba-82e1-000a854537f0\", \"b774ae07-757e-4b3f-aea2-f92c22054047\": \"b774ae07-757e-4b3f-aea2-f92c22054047\", \"1219ed6d-576f-4c37-8582-df7a7549c609\": \"1219ed6d-576f-4c37-8582-df7a7549c609\", \"093cf14f-c32c-4ace-ab51-b8ca328182ef\": \"093cf14f-c32c-4ace-ab51-b8ca328182ef\", \"c21170d5-17b7-4969-bd35-247e64d7ba80\": \"c21170d5-17b7-4969-bd35-247e64d7ba80\", \"080c671e-0d41-4cae-b1c6-86eae8b9d766\": \"080c671e-0d41-4cae-b1c6-86eae8b9d766\", \"435280bb-4f13-43a0-b85d-84b15bf5c068\": \"435280bb-4f13-43a0-b85d-84b15bf5c068\", \"27daf370-2e50-4ec5-b018-5042c377e47a\": \"27daf370-2e50-4ec5-b018-5042c377e47a\", \"b4e7f176-38ed-4745-aa11-a269276dcf01\": \"b4e7f176-38ed-4745-aa11-a269276dcf01\", \"dc57e358-f234-40b4-9349-9ea661334b0b\": \"dc57e358-f234-40b4-9349-9ea661334b0b\", \"e3d14b0a-6e3e-41ad-ac3e-0401ebb4ee4f\": \"e3d14b0a-6e3e-41ad-ac3e-0401ebb4ee4f\", \"8a63ca49-7601-4028-98e0-db936c72e1d4\": \"8a63ca49-7601-4028-98e0-db936c72e1d4\", \"975b98c1-f5fb-440e-af08-f9aa08df44fa\": \"975b98c1-f5fb-440e-af08-f9aa08df44fa\", \"918a71e3-8253-46fe-890e-859452d989ad\": \"918a71e3-8253-46fe-890e-859452d989ad\", \"82e6c0d2-aa08-4278-95d4-fcb585bba247\": \"82e6c0d2-aa08-4278-95d4-fcb585bba247\", \"952a15c4-2362-45fb-bb35-a92ad0f7a0b6\": \"952a15c4-2362-45fb-bb35-a92ad0f7a0b6\", \"df0ece19-6442-41cc-b638-c84ea3ae7f54\": \"df0ece19-6442-41cc-b638-c84ea3ae7f54\", \"757f1bc0-241f-4d29-8cfd-2c7194da0198\": \"757f1bc0-241f-4d29-8cfd-2c7194da0198\", \"b932defa-5914-474b-becf-f7c8f1e03f39\": \"b932defa-5914-474b-becf-f7c8f1e03f39\", \"95624e44-97cb-4a64-b3f7-57d0000fb7cd\": \"95624e44-97cb-4a64-b3f7-57d0000fb7cd\", \"c629cd02-cef2-4db2-8a01-a56d0f817ca8\": \"c629cd02-cef2-4db2-8a01-a56d0f817ca8\", \"84590474-d93e-4d60-a8b7-ac4a3b599c36\": \"84590474-d93e-4d60-a8b7-ac4a3b599c36\", \"95f19890-4d40-49d4-9a69-3dd44b4e2bc8\": \"95f19890-4d40-49d4-9a69-3dd44b4e2bc8\", \"610edfe5-bcf5-4ac4-8905-d4b7a66cff6c\": \"610edfe5-bcf5-4ac4-8905-d4b7a66cff6c\", \"9eab74ab-c2bd-44ee-9710-44a9567a6271\": \"9eab74ab-c2bd-44ee-9710-44a9567a6271\", \"81f0a75c-c88f-44e2-95e0-d65c4848b977\": \"81f0a75c-c88f-44e2-95e0-d65c4848b977\", \"44a964ec-315d-44bb-bd42-55c5347f08d8\": \"44a964ec-315d-44bb-bd42-55c5347f08d8\", \"f101b150-eff0-493c-b846-1f1ace4069a4\": \"f101b150-eff0-493c-b846-1f1ace4069a4\", \"900f3816-8ab2-4331-b248-dc8dd5e9a630\": \"900f3816-8ab2-4331-b248-dc8dd5e9a630\", \"f0be9a22-b0f3-4848-8ddc-5bb833c94000\": \"f0be9a22-b0f3-4848-8ddc-5bb833c94000\", \"3ab118ef-4d1c-465d-bf95-e7535a93bab5\": \"3ab118ef-4d1c-465d-bf95-e7535a93bab5\", \"24f7cd81-ea1d-4ec3-a19f-8eb39d70e20c\": \"24f7cd81-ea1d-4ec3-a19f-8eb39d70e20c\", \"491e44e0-9273-41fa-9a98-f139fae02194\": \"491e44e0-9273-41fa-9a98-f139fae02194\", \"85a4e4cc-1359-4fc2-9a57-7838562ae0ec\": \"85a4e4cc-1359-4fc2-9a57-7838562ae0ec\", \"f4a9e520-6eb1-4e52-9b22-a6bca2e0cb08\": \"f4a9e520-6eb1-4e52-9b22-a6bca2e0cb08\", \"79356976-33a0-4b67-bf8b-112f4f5c720b\": \"79356976-33a0-4b67-bf8b-112f4f5c720b\", \"497e12bb-2b38-45cb-9144-462b90de74a2\": \"497e12bb-2b38-45cb-9144-462b90de74a2\", \"0c93c214-6572-4382-b091-b7b1362ea757\": \"0c93c214-6572-4382-b091-b7b1362ea757\", \"732b278e-96a1-48a3-8d1c-8dca151836a7\": \"732b278e-96a1-48a3-8d1c-8dca151836a7\"}, \"doc_id_dict\": {}, \"embeddings_dict\": {}}"}}}
local_data/private_gpt/qdrant/.lock ADDED
@@ -0,0 +1 @@
 
 
1
+ tmp lock file
local_data/private_gpt/qdrant/collection/make_this_parameterizable_per_api_call/storage.sqlite ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d2b404320d98a66950608d221141ed84446595ef1716df31e54850087f673cd
3
+ size 14405632
local_data/private_gpt/qdrant/meta.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"collections": {"make_this_parameterizable_per_api_call": {"vectors": {"size": 1536, "distance": "Cosine", "hnsw_config": null, "quantization_config": null, "on_disk": null}, "shard_number": null, "replication_factor": null, "write_consistency_factor": null, "on_disk_payload": null, "hnsw_config": null, "wal_config": null, "optimizers_config": null, "init_from": null, "quantization_config": null}}, "aliases": {}}
models/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *
2
+ !.gitignore
private_gpt/__init__.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """private-gpt."""
2
+ import logging
3
+ import os
4
+
5
+ # Set to 'DEBUG' to have extensive logging turned on, even for libraries
6
+ ROOT_LOG_LEVEL = "INFO"
7
+
8
+ PRETTY_LOG_FORMAT = (
9
+ "%(asctime)s.%(msecs)03d [%(levelname)-8s] %(name)+25s - %(message)s"
10
+ )
11
+ logging.basicConfig(level=ROOT_LOG_LEVEL, format=PRETTY_LOG_FORMAT, datefmt="%H:%M:%S")
12
+ logging.captureWarnings(True)
13
+
14
+ # Disable gradio analytics
15
+ # This is done this way because gradio does not solely rely on what values are
16
+ # passed to gr.Blocks(enable_analytics=...) but also on the environment
17
+ # variable GRADIO_ANALYTICS_ENABLED. `gradio.strings` actually reads this env
18
+ # directly, so to fully disable gradio analytics we need to set this env var.
19
+ os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"
20
+
21
+ # Disable chromaDB telemetry
22
+ # It is already disabled, see PR#1144
23
+ # os.environ["ANONYMIZED_TELEMETRY"] = "False"
private_gpt/__main__.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # start a fastapi server with uvicorn
2
+
3
+ import uvicorn
4
+
5
+ from private_gpt.main import app
6
+ from private_gpt.settings.settings import settings
7
+
8
+ # Set log_config=None to do not use the uvicorn logging configuration, and
9
+ # use ours instead. For reference, see below:
10
+ # https://github.com/tiangolo/fastapi/discussions/7457#discussioncomment-5141108
11
+ uvicorn.run(app, host="0.0.0.0", port=settings().server.port, log_config=None)
private_gpt/__pycache__/__init__.cpython-311.pyc ADDED
Binary file (641 Bytes). View file
 
private_gpt/__pycache__/constants.cpython-311.pyc ADDED
Binary file (373 Bytes). View file
 
private_gpt/__pycache__/di.cpython-311.pyc ADDED
Binary file (809 Bytes). View file
 
private_gpt/__pycache__/launcher.cpython-311.pyc ADDED
Binary file (6.44 kB). View file