Added example api key to settings

This commit is contained in:
SwiftyOS
2025-02-28 16:34:29 +01:00
committed by Swifty
parent 79948263c8
commit b9366c9b28
3 changed files with 7 additions and 1 deletions

View File

@@ -72,6 +72,9 @@ PLATFORM_BASE_URL=http://localhost:3000
# For the OAuth callback URL, use <your_frontend_url>/auth/integrations/oauth_callback,
# e.g. http://localhost:3000/auth/integrations/oauth_callback
# Example API Key
EXAMPLE_API_KEY=
# GitHub OAuth App server credentials - https://github.com/settings/developers
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

View File

@@ -172,7 +172,7 @@ zerobounce_credentials = APIKeyCredentials(
example_credentials = APIKeyCredentials(
id="a2b7f68f-aa6a-4995-99ec-b45b40d33498",
provider="example-provider",
api_key=SecretStr("mock-example-api-key"),
api_key=SecretStr(settings.secrets.example_api_key),
title="Use Credits for Example",
expires_at=None,
)
@@ -234,6 +234,8 @@ class IntegrationCredentialsStore:
all_credentials.append(ollama_credentials)
# These will only be added if the API key is set
if settings.secrets.example_api_key:
all_credentials.append(example_credentials)
if settings.secrets.revid_api_key:
all_credentials.append(revid_credentials)
if settings.secrets.ideogram_api_key:

View File

@@ -404,6 +404,7 @@ class Secrets(UpdateTrackingModel["Secrets"], BaseSettings):
smartlead_api_key: str = Field(default="", description="SmartLead API Key")
zerobounce_api_key: str = Field(default="", description="ZeroBounce API Key")
example_api_key: str = Field(default="", description="Example API Key")
# Add more secret fields as needed
model_config = SettingsConfigDict(