Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into json
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <[email protected]>
  • Loading branch information
caarlos0 committed Jan 11, 2024
2 parents ea9bf7f + f85e6d5 commit ee0763d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
5 changes: 5 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"text/template"
"time"

_ "embed"

"github.com/adrg/xdg"
"github.com/caarlos0/duration"
"github.com/caarlos0/env/v9"
Expand All @@ -18,6 +20,9 @@ import (
"gopkg.in/yaml.v3"
)

//go:embed config_template.yml
var configTemplate string

var help = map[string]string{
"api": "OpenAI compatible REST API (openai, localai).",
"apis": "Aliases and endpoints for OpenAI compatible REST API.",
Expand Down
19 changes: 8 additions & 11 deletions config_template.go → config_template.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
package main

const configTemplate = `# {{ index .Help "model" }}
# {{ index .Help "model" }}
default-model: gpt-4
# {{ index .Help "format-text" }}
format-text:
Expand Down Expand Up @@ -45,22 +43,22 @@ apis:
aliases: ["4"]
max-input-chars: 24500
fallback: gpt-3.5-turbo
gpt-4-1106-preview:
aliases: ["128k"]
max-input-chars: 392000
fallback: gpt-4
gpt-4-32k:
aliases: ["32k"]
max-input-chars: 98000
fallback: gpt-4
gpt-4-1106-preview:
aliases: ["4-preview"]
max-input-chars: 98000
fallback: gpt-4
gpt-3.5-turbo:
aliases: ["35t"]
max-input-chars: 12250
fallback: gpt-3.5
gpt-3.5-turbo-1106:
aliases: ["35t1106"]
max-input-chars: 44500
fallback: gpt-3.5
aliases: ["35t-1106"]
max-input-chars: 12250
fallback: gpt-3.5-turbo
gpt-3.5-turbo-16k:
aliases: ["35t16k"]
max-input-chars: 44500
Expand Down Expand Up @@ -96,4 +94,3 @@ apis:
aliases: ["az35"]
max-input-chars: 12250
fallback:
`

0 comments on commit ee0763d

Please sign in to comment.