diff --git a/Makefile b/Makefile index 729d1907..21007cfb 100644 --- a/Makefile +++ b/Makefile @@ -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 . diff --git a/bugs.txt b/bugs.txt deleted file mode 100644 index 9736511a..00000000 --- a/bugs.txt +++ /dev/null @@ -1,5 +0,0 @@ -SERVER_URL is just weird -If the user doesn't reply to prompt, sys.prompt caller doesn't get an error -used ../code in the slack read tool -change LLMRequest/Response to EngineRequest/Response capture the chatresponsecached field -capture USAGE field diff --git a/docs/docs/04-configuration/02-model-providers.md b/docs/docs/04-configuration/02-model-providers.md index eb0d7e54..9d89a9f5 100644 --- a/docs/docs/04-configuration/02-model-providers.md +++ b/docs/docs/04-configuration/02-model-providers.md @@ -1,2 +1,68 @@ # Model Providers -Include details about eactly how to configure each supported model provider \ No newline at end of file + +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). diff --git a/docs/docs/04-configuration/03-auth-providers.md b/docs/docs/04-configuration/03-auth-providers.md index 24ef8df7..e06f45c6 100644 --- a/docs/docs/04-configuration/03-auth-providers.md +++ b/docs/docs/04-configuration/03-auth-providers.md @@ -1,2 +1,30 @@ # Auth Providers -Include details about how to configure each supported auth provider \ No newline at end of file + +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). \ No newline at end of file