Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change otto name to otto8 #551

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .envrc.dev
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export KUBECONFIG=$(pwd)/tools/devmode-kubeconfig
export OTTO_DEV_MODE=true
export OTTO8_DEV_MODE=true
export WORKSPACE_PROVIDER_IGNORE_WORKSPACE_NOT_FOUND=true
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mkdir -p /run/sshd
/usr/sbin/sshd -D &
mkdir -p /data/cache
# This is YAML
export OTTO_SERVER_VERSIONS="$(cat <<VERSIONS
export OTTO8_SERVER_VERSIONS="$(cat <<VERSIONS
"github.com/otto8-ai/tools": "$(cd /otto8-tools && git rev-parse HEAD)"
"github.com/gptscript-ai/workspace-provider": "$(cd /otto8-tools/workspace-provider && git rev-parse HEAD)"
"github.com/gptscript-ai/datasets": "$(cd /otto8-tools/datasets && git rev-parse HEAD)"
Expand All @@ -52,10 +52,10 @@ ENV PATH=$PATH:/usr/lib/libreoffice/program
ENV HOME=/data
ENV XDG_CACHE_HOME=/data/cache
ENV GPTSCRIPT_SYSTEM_TOOLS_DIR=/otto8-tools/
ENV OTTO_SERVER_WORKSPACE_TOOL=/otto8-tools/workspace-provider
ENV OTTO_SERVER_DATASETS_TOOL=/otto8-tools/datasets
ENV OTTO_SERVER_TOOL_REGISTRY=/otto8-tools
ENV OTTO_SERVER_ENCRYPTION_CONFIG_FILE=/encryption.yaml
ENV OTTO8_SERVER_WORKSPACE_TOOL=/otto8-tools/workspace-provider
ENV OTTO8_SERVER_DATASETS_TOOL=/otto8-tools/datasets
ENV OTTO8_SERVER_TOOL_REGISTRY=/otto8-tools
ENV OTTO8_SERVER_ENCRYPTION_CONFIG_FILE=/encryption.yaml
ENV GOMEMLIMIT=1GiB
ENV TERM=vt100
WORKDIR /data
Expand Down
22 changes: 11 additions & 11 deletions docs/docs/04-configuration/02-model-providers.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Model Providers

Each packaged model provider has a slightly different, but all require 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`).
Each packaged model provider has a slightly different, but all require at least, the `OTTO8_*_MODEL_PROVIDER_API_KEY` environment variable are required, where `*` stands in for the name of the provider (e.g. `OTTO8_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:

Expand All @@ -9,7 +9,7 @@ Below is a summary of the configuration options for each provider. However, the
"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"
"envVars": "OTTO8_AZURE_OPENAI_MODEL_PROVIDER_API_KEY,OTTO8_AZURE_OPENAI_MODEL_PROVIDER_ENDPOINT,OTTO8_AZURE_OPENAI_MODEL_PROVIDER_DEPLOYMENT_NAME"
},
"name": "Azure OpenAI Provider",
"toolType": "modelProvider",
Expand All @@ -19,9 +19,9 @@ Below is a summary of the configuration options for each provider. However, the
"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"
"OTTO8_AZURE_OPENAI_MODEL_PROVIDER_API_KEY",
"OTTO8_AZURE_OPENAI_MODEL_PROVIDER_ENDPOINT",
"OTTO8_AZURE_OPENAI_MODEL_PROVIDER_DEPLOYMENT_NAME"
],
"configured": false
}
Expand All @@ -36,7 +36,7 @@ Once all the required environment variables are set, then the API would return s
"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"
"envVars": "OTTO8_AZURE_OPENAI_MODEL_PROVIDER_API_KEY,OTTO8_AZURE_OPENAI_MODEL_PROVIDER_ENDPOINT,OTTO8_AZURE_OPENAI_MODEL_PROVIDER_DEPLOYMENT_NAME"
},
"name": "Azure OpenAI Provider",
"toolType": "modelProvider",
Expand All @@ -54,15 +54,15 @@ 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.
The OpenAI model provider is the default and is configured by either setting `OPENAI_API_KEY` or `OTTO8_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.
- `OTTO8_AZURE_OPENAI_MODEL_PROVIDER_API_KEY`: Found on the "Home" page of the Azure OpenAI Studio.
- `OTTO8_AZURE_OPENAI_MODEL_PROVIDER_DEPLOYMENT_NAME`: The name of the deployment to use, found on the "Deployments" page of the Azure OpenAI Studio.
- `OTTO8_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).
The Anthropic model provider is configured by setting the `OTTO8_ANTHROPIC_MODEL_PROVIDER_API_KEY` environment variable. An API key for your Anthropic account can be obtained [here](https://console.anthropic.com/settings/keys).
22 changes: 11 additions & 11 deletions docs/docs/04-configuration/03-auth-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Authentication providers allow your Otto installation to authenticate users with

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.
- `OTTO8_AUTH_CLIENT_ID`: The client ID of the authentication provider.
- `OTTO8_AUTH_CLIENT_SECRET`: The client secret of the authentication provider.
- `OTTO8_AUTH_COOKIE_SECRET`: The secret used to encrypt the authentication cookie. Must be of size 16, 24, or 32 bytes.
- `OTTO8_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`: A comma-separated list of email domains allowed for authentication. Ignored if not set.
- `OTTO_AUTH_CONFIG_TYPE`: The type of the authentication provider. For example, `google` or `github`. Defaults to `google`.
- `OTTO8_AUTH_EMAIL_DOMAINS`: A comma-separated list of email domains allowed for authentication. Ignored if not set.
- `OTTO8_AUTH_CONFIG_TYPE`: The type of the authentication provider. For example, `google` or `github`. Defaults to `google`.

## Google

Expand All @@ -23,8 +23,8 @@ Google is the default authentication provider. There are currently no additional

GitHub authentication has the following optional configuration:

- `OTTO_AUTH_GITHUB_ORG`: The name of the organization allowed for authentication. Ignored if not set.
- `OTTO_AUTH_GITHUB_TEAM`: The name of the team allowed for authentication. Ignored if not set.
- `OTTO_AUTH_GITHUB_REPOS`: A comma-separated list of the names of the repositories allowed for authentication, in the format `org/repo`. Ignored if not set.
- `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.
- `OTTO8_AUTH_GITHUB_ORG`: The name of the organization allowed for authentication. Ignored if not set.
- `OTTO8_AUTH_GITHUB_TEAM`: The name of the team allowed for authentication. Ignored if not set.
- `OTTO8_AUTH_GITHUB_REPOS`: A comma-separated list of the names of the repositories allowed for authentication, in the format `org/repo`. Ignored if not set.
- `OTTO8_AUTH_GITHUB_TOKEN`: The token to use when verifying repository collaborators (must have push access to the repository).
- `OTTO8_AUTH_GITHUB_ALLOW_USERS`: A comma-separated list of users allowed to login even if they don't belong to the organization or team.
2 changes: 1 addition & 1 deletion pkg/api/handlers/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func GetVersion(req api.Context) error {

func getVersionResponse() map[string]string {
values := make(map[string]string)
versions := os.Getenv("OTTO_SERVER_VERSIONS")
versions := os.Getenv("OTTO8_SERVER_VERSIONS")
if versions != "" {
if err := yaml.Unmarshal([]byte(versions), &values); err != nil {
values["error"] = err.Error()
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/agents.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

type Agents struct {
root *Otto
root *Otto8
Quiet bool `usage:"Only print IDs of agents" short:"q"`
Wide bool `usage:"Print more information" short:"w"`
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

type Create struct {
Quiet bool `usage:"Only print ID after successful creation." short:"q"`
root *Otto
root *Otto8
}

func (l *Create) Customize(cmd *cobra.Command) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

type Credentials struct {
root *Otto
root *Otto8
Wide bool `usage:"Print more information" short:"w"`
Quiet bool `usage:"Only print IDs of credentials" short:"q"`
ThreadID string `usage:"Specific thread list credentials for" short:"t"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/credentials_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

type CredentialsDelete struct {
root *Otto
root *Otto8
Quiet bool `usage:"Only print IDs of credentials" short:"q"`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

type Edit struct {
root *Otto
root *Otto8
Prompt bool `usage:"Edit just the prompt for the agent" short:"p"`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/edit/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

var (
envs = []string{
"OTTO_EDITOR",
"OTTO8_EDITOR",
"EDITOR",
}
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/internal/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func Token(ctx context.Context, baseURL, appName string) (string, error) {
fmt.Println(color.GreenString("========================"))
fmt.Println()
fmt.Println(color.CyanString(serviceName) + " is used for authentication using the browser. This can be bypassed by setting")
fmt.Println("the env var " + color.CyanString("OTTO_API_KEY") + " to your API key.")
fmt.Println("the env var " + color.CyanString("OTTO8_API_KEY") + " to your API key.")
fmt.Println()
fmt.Println(color.GreenString("Press ENTER to continue (CTRL+C to exit)"))
if err := enter(ctx); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/invoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Invoke struct {
Quiet *bool `usage:"Only print output characters" short:"q"`
Verbose bool `usage:"Print more information" short:"v"`
Async bool `usage:"Run the agent asynchronously" short:"a"`
root *Otto
root *Otto8
}

func (l *Invoke) GetQuiet() bool {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

type Delete struct {
root *Otto
root *Otto8
}

func (l *Delete) Customize(cmd *cobra.Command) {
Expand Down
14 changes: 7 additions & 7 deletions pkg/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
"golang.org/x/term"
)

type Otto struct {
type Otto8 struct {
Debug bool `usage:"Enable debug logging"`
Client *apiclient.Client
}

func (a *Otto) PersistentPre(cmd *cobra.Command, args []string) error {
func (a *Otto8) PersistentPre(cmd *cobra.Command, args []string) error {
if os.Getenv("NO_COLOR") != "" || !term.IsTerminal(int(os.Stdout.Fd())) {
color.NoColor = true
}
Expand All @@ -27,7 +27,7 @@ func (a *Otto) PersistentPre(cmd *cobra.Command, args []string) error {
logger.SetDebug()
}

if a.Client.Token == "" && cmd.Use != "server" && cmd.Use != "otto" {
if a.Client.Token == "" && cmd.Use != "server" && cmd.Use != "otto8" && cmd.Use != "version" {
token, err := internal.Token(cmd.Context(), a.Client.BaseURL, "otto8")
if err != nil {
return err
Expand All @@ -40,10 +40,10 @@ func (a *Otto) PersistentPre(cmd *cobra.Command, args []string) error {
}

func New() *cobra.Command {
root := &Otto{
root := &Otto8{
Client: &apiclient.Client{
BaseURL: env.VarOrDefault("OTTO_BASE_URL", "http://localhost:8080/api"),
Token: os.Getenv("OTTO_TOKEN"),
BaseURL: env.VarOrDefault("OTTO8_BASE_URL", "http://localhost:8080/api"),
Token: os.Getenv("OTTO8_TOKEN"),
},
}
return cmd.Command(root,
Expand All @@ -67,6 +67,6 @@ func New() *cobra.Command {
)
}

func (a *Otto) Run(cmd *cobra.Command, args []string) error {
func (a *Otto8) Run(cmd *cobra.Command, args []string) error {
return cmd.Help()
}
2 changes: 1 addition & 1 deletion pkg/cli/run_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

type Debug struct {
root *Otto
root *Otto8
}

func (l *Debug) Customize(cmd *cobra.Command) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/run_print.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

type RunPrint struct {
root *Otto
root *Otto8
Quiet bool `usage:"Only print the response content of the runs" short:"q"`
Verbose bool `usage:"Print more information" short:"v"`
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/runs.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

type Runs struct {
root *Otto
root *Otto8
Wide bool `usage:"Print more information" short:"w"`
Quiet bool `usage:"Only print IDs of runs" short:"q"`
Follow bool `usage:"Follow the output of runs" short:"f"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/steptemplates_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

type StepTemplateUpdate struct {
root *Otto
root *Otto8
Quiet bool `usage:"Only print IDs of updated step template" short:"q"`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/threadprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

type ThreadPrint struct {
root *Otto
root *Otto8
Quiet bool `usage:"Only print response content of threads" short:"q"`
Follow bool `usage:"Follow the thread and print new events" short:"f"`
Verbose bool `usage:"Print more information" short:"v"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/threads.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

type Threads struct {
root *Otto
root *Otto8
Quiet bool `usage:"Only print IDs of threads" short:"q"`
Wide bool `usage:"Print more information" short:"w"`
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

type Tools struct {
root *Otto
root *Otto8
Quiet bool `usage:"Only print IDs of tools" short:"q"`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/tools_register.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

type ToolRegister struct {
root *Otto
root *Otto8
Quiet bool `usage:"Only print IDs of created tool references:"q"`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/tools_unregister.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

type ToolUnregister struct {
root *Otto
root *Otto8
Quiet bool `usage:"Only print IDs of unregistered tool references" short:"q"`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

type Update struct {
root *Otto
root *Otto8
Quiet bool `usage:"Only print IDs of updated agent/workflow" short:"q"`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

type Version struct {
root *Otto
root *Otto8
}

func (l *Version) Run(cmd *cobra.Command, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/workflow_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

type WorkflowAuth struct {
root *Otto
root *Otto8
}

func (l *WorkflowAuth) Customize(cmd *cobra.Command) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/workflows.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

type Workflows struct {
root *Otto
root *Otto8
Quiet bool `usage:"Only print IDs of agents" short:"q"`
Wide bool `usage:"Print more information" short:"w"`
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/events/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ func (e *Emitter) printCall(ctx context.Context, namespace, runID string, prg *g

func isSubCallTargetIDs(tool gptscript.Tool) (agentID string, workflowID string) {
for _, line := range strings.Split(tool.Instructions, "\n") {
suffix, ok := strings.CutPrefix(line, "#OTTO_SUBCALL: TARGET: ")
suffix, ok := strings.CutPrefix(line, "#OTTO8_SUBCALL: TARGET: ")
if !ok {
continue
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/server/dispatcher/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type Dispatcher struct {

func New(invoker *invoke.Invoker, c kclient.Client) *Dispatcher {
return &Dispatcher{
openAIAPIKey: os.Getenv("OTTO_OPENAI_MODEL_PROVIDER_API_KEY"),
openAIAPIKey: os.Getenv("OTTO8_OPENAI_MODEL_PROVIDER_API_KEY"),
invoker: invoker,
client: c,
lock: new(sync.RWMutex),
Expand Down
Loading