Skip to content

Commit

Permalink
feat: Recognise model text-unicorn
Browse files Browse the repository at this point in the history
  • Loading branch information
prantlf committed Jun 4, 2024
1 parent cbfe399 commit 8e83e7e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/routes/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ func HandleGenerate(w http.ResponseWriter, r *http.Request) int {
var handler generateModelHandler
if strings.HasPrefix(input.Model, "gemini") {
handler = &generateGeminiHandler{}
} else if strings.HasPrefix(input.Model, "text-bison") {
} else if strings.HasPrefix(input.Model, "text-bison") ||
strings.HasPrefix(input.Model, "text-unicorn") {
handler = &generateBisonHandler{}
} else if !canProxy {
return wrongInput(w, fmt.Sprintf("unrecognised model %q", input.Model))
Expand Down
13 changes: 13 additions & 0 deletions internal/routes/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,19 @@ var googleModels = []modelInfo{
},
ExpiresAt: "2024-07-06T00:00:00.000Z",
},
{
Name: "text-unicorn@001",
Model: "text-unicorn@001",
ModifiedAt: "2023-11-30T00:00:00.000Z",
Details: modelDetails{
Family: "text-unicorn",
Families: []string{
"text-unicorn",
},
Purposes: []string{"generate"},
},
ExpiresAt: "2024-11-30T00:00:00.000Z",
},
{
Name: "textembedding-gecko@002",
Model: "textembedding-gecko@002",
Expand Down

0 comments on commit 8e83e7e

Please sign in to comment.