Skip to content

Commit

Permalink
Merge pull request #875 from peersky/patch-1
Browse files Browse the repository at this point in the history
Add google model env vars
  • Loading branch information
jkbrooks authored Dec 6, 2024
2 parents 59dc67b + de9d382 commit c40a1f7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ SMALL_OLLAMA_MODEL= # Default: llama3.2
MEDIUM_OLLAMA_MODEL= # Default: hermes3
LARGE_OLLAMA_MODEL= # Default: hermes3:70b

# Google Configuration
GOOGLE_MODEL=
SMALL_GOOGLE_MODEL= # Default: gemini-1.5-flash-latest
MEDIUM_GOOGLE_MODEL= # Default: gemini-1.5-flash-latest
LARGE_GOOGLE_MODEL= # Default: gemini-1.5-pro-latest
EMBEDDING_GOOGLE_MODEL= # Default: text-embedding-004



#LlamaLocal Configuration
LLAMALOCAL_PATH= # Default: "" which is the current directory in plugin-node/dist/ which gets destroyed and recreated on every build

Expand Down
16 changes: 12 additions & 4 deletions packages/core/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,18 @@ export const models: Models = {
temperature: 0.7,
},
model: {
[ModelClass.SMALL]: "gemini-1.5-flash-latest",
[ModelClass.MEDIUM]: "gemini-1.5-flash-latest",
[ModelClass.LARGE]: "gemini-1.5-pro-latest",
[ModelClass.EMBEDDING]: "text-embedding-004",
[ModelClass.SMALL]: settings.SMALL_GOOGLE_MODEL ||
settings.GOOGLE_MODEL ||
"gemini-1.5-flash-latest",
[ModelClass.MEDIUM]: settings.MEDIUM_GOOGLE_MODEL ||
settings.GOOGLE_MODEL ||
"gemini-1.5-flash-latest",
[ModelClass.LARGE]: settings.LARGE_GOOGLE_MODEL ||
settings.GOOGLE_MODEL ||
"gemini-1.5-pro-latest",
[ModelClass.EMBEDDING]: settings.EMBEDDING_GOOGLE_MODEL ||
settings.GOOGLE_MODEL ||
"text-embedding-004",
},
},
[ModelProviderName.REDPILL]: {
Expand Down

0 comments on commit c40a1f7

Please sign in to comment.