Skip to content

Commit

Permalink
handle llama_local getTokenForProvider properly
Browse files Browse the repository at this point in the history
  • Loading branch information
odilitime committed Dec 19, 2024
1 parent 86005ad commit 5c9b4ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,11 @@ export async function loadCharacters(
export function getTokenForProvider(
provider: ModelProviderName,
character: Character
) {
):string {
switch (provider) {
// no key needed for llama_local
case ModelProviderName.LLAMALOCAL:
return ''
case ModelProviderName.OPENAI:
return (
character.settings?.secrets?.OPENAI_API_KEY ||
Expand Down

0 comments on commit 5c9b4ff

Please sign in to comment.