Skip to content

Commit

Permalink
Merge pull request #1310 from oxSaturn/fix/support-google
Browse files Browse the repository at this point in the history
fix: support google model.
  • Loading branch information
monilpat authored Dec 21, 2024
2 parents 2f56c95 + 285725e commit 5c1fe07
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ export function getTokenForProvider(
character.settings?.secrets?.AKASH_CHAT_API_KEY ||
settings.AKASH_CHAT_API_KEY
);
case ModelProviderName.GOOGLE:
return (
character.settings?.secrets?.GOOGLE_GENERATIVE_AI_API_KEY ||
settings.GOOGLE_GENERATIVE_AI_API_KEY
);
default:
const errorMessage = `Failed to get token - unsupported model provider: ${provider}`;
elizaLogger.error(errorMessage);
Expand Down

0 comments on commit 5c1fe07

Please sign in to comment.