diff --git a/autogpt_platform/backend/backend/integrations/credentials_store.py b/autogpt_platform/backend/backend/integrations/credentials_store.py index 3aa7a7fb8a9e..ee1c05bf1ad5 100644 --- a/autogpt_platform/backend/backend/integrations/credentials_store.py +++ b/autogpt_platform/backend/backend/integrations/credentials_store.py @@ -23,6 +23,15 @@ settings = Settings() +# This is an overrride since ollama doesn't actually require an API key, but the creddential system enforces one be attached +ollama_credentials = APIKeyCredentials( + id="744fdc56-071a-4761-b5a5-0af0ce10a2b5", + provider="ollama", + api_key=SecretStr("FAKE_API_KEY"), + title="Use Credits for Ollama", + expires_at=None, +) + revid_credentials = APIKeyCredentials( id="fdb7f412-f519-48d1-9b5f-d2f73d0e01fe", provider="revid", @@ -124,6 +133,7 @@ DEFAULT_CREDENTIALS = [ + ollama_credentials, revid_credentials, ideogram_credentials, replicate_credentials, @@ -169,6 +179,10 @@ def add_creds(self, user_id: str, credentials: Credentials) -> None: def get_all_creds(self, user_id: str) -> list[Credentials]: users_credentials = self._get_user_integrations(user_id).credentials all_credentials = users_credentials + # These will always be added + all_credentials.append(ollama_credentials) + + # These will only be added if the API key is set if settings.secrets.revid_api_key: all_credentials.append(revid_credentials) if settings.secrets.ideogram_api_key: diff --git a/autogpt_platform/frontend/src/app/profile/page.tsx b/autogpt_platform/frontend/src/app/profile/page.tsx index b3097577db3a..d5960c2fdb5f 100644 --- a/autogpt_platform/frontend/src/app/profile/page.tsx +++ b/autogpt_platform/frontend/src/app/profile/page.tsx @@ -98,6 +98,7 @@ export default function PrivatePage() { // This contains ids for built-in "Use Credits for X" credentials const hiddenCredentials = useMemo( () => [ + "744fdc56-071a-4761-b5a5-0af0ce10a2b5", // Ollama "fdb7f412-f519-48d1-9b5f-d2f73d0e01fe", // Revid "760f84fc-b270-42de-91f6-08efe1b512d0", // Ideogram "6b9fc200-4726-4973-86c9-cd526f5ce5db", // Replicate diff --git a/autogpt_platform/frontend/src/app/store/(user)/integrations/page.tsx b/autogpt_platform/frontend/src/app/store/(user)/integrations/page.tsx index a4fa36ab29e3..644c2d9ce10a 100644 --- a/autogpt_platform/frontend/src/app/store/(user)/integrations/page.tsx +++ b/autogpt_platform/frontend/src/app/store/(user)/integrations/page.tsx @@ -98,6 +98,7 @@ export default function PrivatePage() { // This contains ids for built-in "Use Credits for X" credentials const hiddenCredentials = useMemo( () => [ + "744fdc56-071a-4761-b5a5-0af0ce10a2b5", // Ollama "fdb7f412-f519-48d1-9b5f-d2f73d0e01fe", // Revid "760f84fc-b270-42de-91f6-08efe1b512d0", // Ideogram "6b9fc200-4726-4973-86c9-cd526f5ce5db", // Replicate