Skip to content

Commit

Permalink
[chore] need this for packaging goose with provider config (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelneale authored Jan 8, 2025
1 parent 6cb5076 commit 426e997
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ui/desktop/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ const parseArgs = () => {
const checkApiCredentials = () => {
loadZshEnv(app.isPackaged);


//{env-macro-start}//
//needed when goose is bundled for a specific provider

const apiKeyProvidersValid =
['openai', 'anthropic', 'google', 'groq', 'openrouter'].includes(process.env.GOOSE_PROVIDER__TYPE) &&
process.env.GOOSE_PROVIDER__HOST &&
Expand All @@ -49,6 +53,9 @@ const checkApiCredentials = () => {
process.env.GOOSE_PROVIDER__MODEL;

return apiKeyProvidersValid || optionalApiKeyProvidersValid;

//needed when goose is bundled for a specific provider:
//{env-macro-end}//
};

const generateSecretKey = () => {
Expand Down

0 comments on commit 426e997

Please sign in to comment.