Skip to content

Commit

Permalink
Update github env var examples (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickBusey authored Nov 27, 2024
1 parent 61fdd10 commit d7b6b51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/integrations/knowledge-base.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ Or you can comment directly on some lines of code in the PR. `@coderabbitai do n

## Self-hosted knowledge base {#self-hosted}

For self-hosted / on-premises deployments, you can enable the knowledge base features by setting `ON_PREM_KNOWLEDGE_BASE=true` in the environment variables for your self-hosted docker image.
For self-hosted / on-premises deployments, you can enable the knowledge base features by setting `SELF_HOSTED_KNOWLEDGE_BASE=true` in the environment variables for your self-hosted docker image.

You must also be running ChromaDB. Use image `chromadb/chroma:0.5.20`. In your CodeRabbit docker image environment variables, set `CHROMADB_URL` to point to the hostname where ChromaDB can be reached. For persistance of your ChromaDB data, mount `/chroma/chroma` in the container to a volume mount. For more information on ChromaDB docker deployment, including how to set up authentication, refer to the [official documentation](https://docs.trychroma.com/deployment/docker). CodeRabbit will use `CHROMA_CLIENT_AUTH_CREDENTIALS` if it is set.

By default, CodeRabbit will store its data in the `coderabbitai/data` branch, unless you set a value for `ON_PREM_KNOWLEDGE_BASE_BRANCH=<branch_name>`.
By default, CodeRabbit will store its data in the `coderabbitai/data` branch, unless you set a value for `SELF_HOSTED_KNOWLEDGE_BASE_BRANCH=<branch_name>`.

### Walkthrough

Expand All @@ -66,5 +66,5 @@ By default, CodeRabbit will store its data in the `coderabbitai/data` branch, un
`@coderabbitai always make sure to enforce camelCase`

- CodeRabbit should respond that it has added a learning.
- Check out the branch called `coderabbit/data` in the repository (or whatever branch name you have set for `ON_PREM_KNOWLEDGE_BASE_BRANCH`). It should contain a file called learnings.json with an entry containing what you told it to remember.
- Check out the branch called `coderabbit/data` in the repository (or whatever branch name you have set for `SELF_HOSTED_KNOWLEDGE_BASE_BRANCH`). It should contain a file called learnings.json with an entry containing what you told it to remember.
- Future PRs should utilize the contents of this learnings file. Congratulations! You have configured the CodeRabbit Self-hosted knowledge base.
7 changes: 4 additions & 3 deletions docs/self-hosted/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ GITHUB_APP_PEM_FILE=<flattened-pem-file>
CODERABBIT_LICENSE_KEY=<license-key>

CODERABBIT_API_KEY=[<coderabbitai-api-key>]
# This will use your CodeRabbit API key to store learnings on our servers.
ENABLE_LEARNINGS=[true]
ENABLE_METRICS=[true]

Expand All @@ -108,10 +109,10 @@ OAUTH2_ENDPOINT=[<endpoint>]
OAUTH2_CLIENT_ID=[<client-id>]
OAUTH2_CLIENT_SECRET=[<client-secret>]

# Set to true to use the knowledge base features.
ON_PREM_KNOWLEDGE_BASE=[true]
# Set to true to use the on-prem knowledge base features. This will take precedence over the ENABLE_LEARNINGS flag above.
SELF_HOSTED_KNOWLEDGE_BASE=[true]
# The branch which CodeRabbit will store the knowledge base json files in.
ON_PREM_KNOWLEDGE_BASE_BRANCH=[coderabbitai/data]
SELF_HOSTED_KNOWLEDGE_BASE_BRANCH=[coderabbitai/data]
# URL to the host running ChromaDB 0.5.20.
CHROMADB_URL=[http://chromadb:8000]
```
Expand Down

0 comments on commit d7b6b51

Please sign in to comment.