Skip to content

Commit

Permalink
feat(you): add gemini model
Browse files Browse the repository at this point in the history
  • Loading branch information
bincooo committed Aug 11, 2024
1 parent b09bc54 commit 511da6b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/bincooo/edge-api v1.0.4-0.20240801160633-4131c13986a5
github.com/bincooo/emit.io v1.0.1-0.20240802064836-3c7c7851d923
github.com/bincooo/vecmul.com v0.0.0-20240806095224-6e571cbe7b7e
github.com/bincooo/you.com v0.0.0-20240810152540-6ccb1b8b82bd
github.com/bincooo/you.com v0.0.0-20240811060426-157d8d1dabd6
github.com/dlclark/regexp2 v1.7.0
github.com/dop251/goja v0.0.0-20240707163329-b1681fb2a2f5
github.com/eko/gocache/lib/v4 v4.1.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ github.com/bincooo/emit.io v1.0.1-0.20240802064836-3c7c7851d923 h1:yNU1xq3eT7ct3
github.com/bincooo/emit.io v1.0.1-0.20240802064836-3c7c7851d923/go.mod h1:pR3KSIIoS+5KHYF+l2BQn427+C6PeDFI71DnhnakELI=
github.com/bincooo/vecmul.com v0.0.0-20240806095224-6e571cbe7b7e h1:NEPtfaeaLrY5fSAykG9gopRovHwIvORJGGCSRhVyHTQ=
github.com/bincooo/vecmul.com v0.0.0-20240806095224-6e571cbe7b7e/go.mod h1:YqrsM+ORzIuR/2guKHE89xHiJ1+tvHm+aPV7pVbvFO4=
github.com/bincooo/you.com v0.0.0-20240810152540-6ccb1b8b82bd h1:tL53g3UieSzexyFaRBW17mnOjdCkvgAUR8FWS8centU=
github.com/bincooo/you.com v0.0.0-20240810152540-6ccb1b8b82bd/go.mod h1:1Nz7XPpSyrWuEhJoEechws3OoddrtU7h3MNBDG0zcmE=
github.com/bincooo/you.com v0.0.0-20240811060426-157d8d1dabd6 h1:5Uw31ZB3nksGl08+eCMr+rjhYCgUwpz8bFcNhQdn/jQ=
github.com/bincooo/you.com v0.0.0-20240811060426-157d8d1dabd6/go.mod h1:1Nz7XPpSyrWuEhJoEechws3OoddrtU7h3MNBDG0zcmE=
github.com/bogdanfinn/fhttp v0.5.28 h1:G6thT8s8v6z1IuvXMUsX9QKy3ZHseTQTzxuIhSiaaAw=
github.com/bogdanfinn/fhttp v0.5.28/go.mod h1:oJiYPG3jQTKzk/VFmogH8jxjH5yiv2rrOH48Xso2lrE=
github.com/bogdanfinn/tls-client v1.7.7 h1:c3mf6LX6bxEsunJhP2BJeJE7qN/7BniWUpIpBc9Igu8=
Expand Down
23 changes: 22 additions & 1 deletion internal/plugin/llm/you/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ func (API) Match(_ *gin.Context, model string) bool {
you.CLAUDE_3_HAIKU,
you.CLAUDE_3_SONNET,
you.CLAUDE_3_5_SONNET,
you.CLAUDE_3_OPUS:
you.CLAUDE_3_OPUS,
you.GEMINI_1_0_PRO,
you.GEMINI_1_5_PRO,
you.GEMINI_1_5_FLASH:
return true
}
}
Expand Down Expand Up @@ -172,6 +175,24 @@ func (API) Models() []plugin.Model {
Created: 1686935002,
By: Model + "-adapter",
},
{
Id: "you/" + you.GEMINI_1_0_PRO,
Object: "model",
Created: 1686935002,
By: Model + "-adapter",
},
{
Id: "you/" + you.GEMINI_1_5_PRO,
Object: "model",
Created: 1686935002,
By: Model + "-adapter",
},
{
Id: "you/" + you.GEMINI_1_5_FLASH,
Object: "model",
Created: 1686935002,
By: Model + "-adapter",
},
}
}

Expand Down

0 comments on commit 511da6b

Please sign in to comment.