Skip to content

Commit

Permalink
chore: add basic configuration documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Nov 11, 2024
1 parent 1ca8f3b commit 25bd59d
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 7 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ clean:
rm -rf ui/admin/build
rm -rf ui/user/build

serve-docs:
cd docs && \
npm install && \
npm run start

# Build the project
build:
go build -ldflags="-s -w" -o bin/otto8 .
Expand Down
5 changes: 0 additions & 5 deletions bugs.txt

This file was deleted.

68 changes: 67 additions & 1 deletion docs/docs/04-configuration/02-model-providers.md
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).
30 changes: 29 additions & 1 deletion docs/docs/04-configuration/03-auth-providers.md
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

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).

0 comments on commit 25bd59d

Please sign in to comment.