-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add basic configuration documentation
Signed-off-by: Donnie Adams <[email protected]>
- Loading branch information
Showing
4 changed files
with
101 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,68 @@ | ||
# Model Providers | ||
Include details about eactly how to configure each supported model provider | ||
|
||
Each package model provider is configured slightly differently, but, at least, the `OTTO_*_MODEL_PROVIDER_API_KEY` environment variable are required, where `*` stands in for the name of the provider (e.g. `OTTO_AZURE_OPENAI_MODEL_PROVIDER_API_KEY`). | ||
|
||
Below is a summary of the configuration options for each provider. However, the packaged model providers are configured to indicate which environment variables are required and which ones are not set in the current environment. For example, `/api/tool-references/azure-openai-model-provider` would indicate the status of the Azure OpenAI model provider. If the environment variables are not set, then the API would return something like: | ||
|
||
```json | ||
{ | ||
"id": "azure-openai-model-provider", | ||
"created": "2024-11-08T16:03:21-05:00", | ||
"metadata": { | ||
"envVars": "OTTO_AZURE_OPENAI_MODEL_PROVIDER_API_KEY,OTTO_AZURE_OPENAI_MODEL_PROVIDER_ENDPOINT,OTTO_AZURE_OPENAI_MODEL_PROVIDER_DEPLOYMENT_NAME" | ||
}, | ||
"name": "Azure OpenAI Provider", | ||
"toolType": "modelProvider", | ||
"reference": "github.com/otto8-ai/tools/./azure-openai-model-provider", | ||
"active": true, | ||
"builtin": true, | ||
"description": "Model provider for Azure OpenAI hosted models", | ||
"modelProviderStatus": { | ||
"missingEnvVars": [ | ||
"OTTO_AZURE_OPENAI_MODEL_PROVIDER_API_KEY", | ||
"OTTO_AZURE_OPENAI_MODEL_PROVIDER_ENDPOINT", | ||
"OTTO_AZURE_OPENAI_MODEL_PROVIDER_DEPLOYMENT_NAME" | ||
], | ||
"configured": false | ||
} | ||
} | ||
|
||
``` | ||
|
||
Once all the required environment variables are set, then the API would return something like: | ||
|
||
```json | ||
{ | ||
"id": "azure-openai-model-provider", | ||
"created": "2024-11-08T16:03:21-05:00", | ||
"metadata": { | ||
"envVars": "OTTO_AZURE_OPENAI_MODEL_PROVIDER_API_KEY,OTTO_AZURE_OPENAI_MODEL_PROVIDER_ENDPOINT,OTTO_AZURE_OPENAI_MODEL_PROVIDER_DEPLOYMENT_NAME" | ||
}, | ||
"name": "Azure OpenAI Provider", | ||
"toolType": "modelProvider", | ||
"reference": "github.com/otto8-ai/tools/./azure-openai-model-provider", | ||
"active": true, | ||
"builtin": true, | ||
"description": "Model provider for Azure OpenAI hosted models", | ||
"modelProviderStatus": { | ||
"configured": true | ||
} | ||
} | ||
``` | ||
|
||
The UI also uses this API to indicate the status of the model provider. | ||
|
||
## OpenAI | ||
|
||
The OpenAI model provider is the default and is configured by either setting `OPENAI_API_KEY` or `OTTO_OPENAI_MODEL_PROVIDER_API_KEY` environment variables. | ||
|
||
## Azure OpenAI | ||
|
||
The Azure OpenAI model provider is configured by setting the following environment variables: | ||
- `OTTO_AZURE_OPENAI_MODEL_PROVIDER_API_KEY`: Found on the "Home" page of the Azure OpenAI Studio. | ||
- `OTTO_AZURE_OPENAI_MODEL_PROVIDER_DEPLOYMENT_NAME`: The name of the deployment to use, found on the "Deployments" page of the Azure OpenAI Studio. | ||
- `OTTO_AZURE_OPENAI_MODEL_PROVIDER_ENDPOINT`: The endpoint to use, found by clicking on the "Deployment" name from the "Deployments" page of the Azure OpenAI Studio. | ||
|
||
## Anthropic | ||
|
||
The Anthropic model provider is configured by setting the `OTTO_ANTHROPIC_MODEL_PROVIDER_API_KEY` environment variable. An API key for your Anthropic account can be obtained [here](https://console.anthropic.com/settings/keys). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,30 @@ | ||
# Auth Providers | ||
Include details about how to configure each supported auth provider | ||
|
||
Authentication providers allow your Otto installation to authenticate users with the identity provider of your choice. All authentication providers are configured using environment variables. | ||
|
||
## Common Environment Variables | ||
|
||
The following environment variables are required for all authentication providers. Setting the Client ID and Client Secret will mean that the authentication provider is enabled. The remaining configuration will be validated on startup. | ||
|
||
- `OTTO_AUTH_CLIENT_ID`: The client ID of the authentication provider. | ||
- `OTTO_AUTH_CLIENT_SECRET`: The client secret of the authentication provider. | ||
- `OTTO_AUTH_COOKIE_SECRET`: The secret used to encrypt the authentication cookie. Must be of size 16, 24, or 32 bytes. | ||
- `OTTO_AUTH_ADMIN_EMAILS`: A comma-separated list of the email addresses of the admin users. | ||
|
||
The following environment variables are optional for all authentication providers: | ||
- `OTTO_AUTH_EMAIL_DOMAINS`: The email domains allowed for authentication. Defaults to `*`. | ||
- `OTTO_AUTH_CONFIG_TYPE`: The type of the authentication provider. For example, `google` or `github`. Defaults to `google`. | ||
|
||
|
||
Google is the default authentication provider. There are currently no additional environment variables required for Google authentication. | ||
|
||
## GitHub | ||
|
||
GitHub authentication has the following optional configuration: | ||
|
||
- `OTTO_AUTH_GITHUB_ORG`: The name of the organization allowed for authentication. Defaults to `*`. | ||
- `OTTO_AUTH_GITHUB_TEAM`: The name of the team allowed for authentication. Defaults to `*`. | ||
- `OTTO_AUTH_GITHUB_REPOS`: A comma-separated list of the names of the repositories allowed for authentication, in the format `org/repo`. Defaults to `*`. | ||
- `OTTO_AUTH_GITHUB_TOKEN`: The token to use when verifying repository collaborators (must have push access to the repository). | ||
- `OTTO_AUTH_GITHUB_ALLOW_USERS`: A comma-separated list of users allowed to login even if they don't belong to the organization or team(s). |