Skip to content

Commit

Permalink
Merge pull request #296 from ai16z/Ft-Grok-Model-Provider
Browse files Browse the repository at this point in the history
Added missing GROK model provider key initialization
  • Loading branch information
lalalune authored Nov 13, 2024
2 parents 7fcf54e + ae9f80e commit 8af7170
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ characters/

packages/core/src/providers/cache
packages/core/src/providers/cache/*
cache/*
cache/*
packages/core/cache/*
9 changes: 6 additions & 3 deletions packages/agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ export function getTokenForProvider(
character.settings?.secrets?.OPENROUTER ||
settings.OPENROUTER_API_KEY
);
case ModelProviderName.GROK:
return (
character.settings?.secrets?.GROK_API_KEY ||
settings.GROK_API_KEY
);
}
}

Expand Down Expand Up @@ -223,9 +228,7 @@ export async function createAgent(
plugins: [
bootstrapPlugin,
nodePlugin,
character.settings.secrets?.WALLET_PUBLIC_KEY
? solanaPlugin
: null
character.settings.secrets?.WALLET_PUBLIC_KEY ? solanaPlugin : null,
].filter(Boolean),
providers: [],
actions: [],
Expand Down

0 comments on commit 8af7170

Please sign in to comment.