Skip to content

Commit

Permalink
Merge pull request #22 from ai16z/main
Browse files Browse the repository at this point in the history
merge from main
  • Loading branch information
MarcoMandar authored Nov 10, 2024
2 parents 574da20 + 15f7ba8 commit 77dab6e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions packages/agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,17 @@ export function getTokenForProvider(
character.settings?.secrets?.OPENAI_API_KEY ||
settings.OPENAI_API_KEY
);
case ModelProviderName.LLAMACLOUD:
return (
character.settings?.secrets?.LLAMACLOUD_API_KEY ||
settings.LLAMACLOUD_API_KEY ||
character.settings?.secrets?.TOGETHER_API_KEY ||
settings.TOGETHER_API_KEY ||
character.settings?.secrets?.XAI_API_KEY ||
settings.XAI_API_KEY ||
character.settings?.secrets?.OPENAI_API_KEY ||
settings.OPENAI_API_KEY
);
case ModelProviderName.ANTHROPIC:
return (
character.settings?.secrets?.ANTHROPIC_API_KEY ||
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export async function generateText({
}

case ModelProviderName.GOOGLE:
const google = createGoogleGenerativeAI();
{ const google = createGoogleGenerativeAI();

const { text: anthropicResponse } = await aiGenerateText({
model: google(model),
Expand All @@ -122,7 +122,7 @@ export async function generateText({
});

response = anthropicResponse;
break;
break; }

case ModelProviderName.ANTHROPIC: {
elizaLogger.log("Initializing Anthropic model.");
Expand Down

0 comments on commit 77dab6e

Please sign in to comment.