Skip to content

Commit

Permalink
Merge pull request #426 from miurla/feat/update-gemini-2.0
Browse files Browse the repository at this point in the history
feat(models): update Gemini models
  • Loading branch information
miurla authored Feb 5, 2025
2 parents 3b9ab6e + fcafd07 commit 54958b2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ This will allow you to use Morphic as your default search engine in the browser.
- gpt-4-turbo
- gpt-3.5-turbo
- Google
- Gemini 1.5 Pro (Unstable)
- Gemini 2.0 Flash (Experimental)
- Gemini 2.0 Pro (Experimental)
- Gemini 2.0 Flash Thinking (Experimental)
- Gemini 2.0 Flash
- Anthropic
- Claude 3.5 Sonnet
- Claude 3.5 Hike
Expand Down
14 changes: 10 additions & 4 deletions lib/types/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,20 @@ export const models: Model[] = [
providerId: 'deepseek'
},
{
id: 'gemini-1.5-pro-002',
name: 'Gemini 1.5 Pro',
id: 'gemini-2.0-pro-exp-02-05',
name: 'Gemini 2.0 Pro (Exp)',
provider: 'Google Generative AI',
providerId: 'google'
},
{
id: 'gemini-2.0-flash-exp',
name: 'Gemini 2.0 Flash (Experimental)',
id: 'gemini-2.0-flash-thinking-exp-01-21',
name: 'Gemini 2.0 Flash Thinking (Exp)',
provider: 'Google Generative AI',
providerId: 'google'
},
{
id: 'gemini-2.0-flash',
name: 'Gemini 2.0 Flash',
provider: 'Google Generative AI',
providerId: 'google'
},
Expand Down
7 changes: 7 additions & 0 deletions lib/utils/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ export function getToolCallModel(model?: string) {
const ollamaModel =
process.env.NEXT_PUBLIC_OLLAMA_TOOL_CALL_MODEL || modelName
return getModel(`ollama:${ollamaModel}`)
case 'google':
return getModel('google:gemini-2.0-flash')
default:
return getModel('openai:gpt-4o-mini')
}
Expand All @@ -141,6 +143,11 @@ export function isToolCallSupported(model?: string) {
if (provider === 'ollama') {
return false
}

if (provider === 'google') {
return false
}

// Deepseek R1 is not supported
// Deepseek v3's tool call is unstable, so we include it in the list
return !modelName?.includes('deepseek')
Expand Down

0 comments on commit 54958b2

Please # to comment.