Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweak(backend): Update all block costs #8639

Merged
merged 3 commits into from
Nov 13, 2024

Conversation

Torantulino
Copy link
Member

@Torantulino Torantulino commented Nov 13, 2024

PR Description

This PR updates block cost configuration.

Key Changes:

  1. Credentials Store:

    • Added unreal_credentials to manage Unreal Speech API keys.
    • Updated DEFAULT_CREDENTIALS and get_all_creds methods to include Unreal Speech credentials if available.
    • Defined unreal_speech_api_key in Secrets to handle Unreal Speech API keys.
  2. Block Cost Configuration:

    • Added UnrealTextToSpeechBlock with a cost of 5 credits, referencing Unreal Speech API credentials.
    • Updated block costs for IdeogramModelBlock and AIShortformVideoCreatorBlock.
    • Introduced new block costs: AIMusicGeneratorBlock, JinaEmbeddingBlock, and AIListGeneratorBlock with specific cost configurations.

These changes enable us to provide Unreal Speech API support and expand the platform's capabilities with new blocks, while adjusting costs for existing blocks.

This commit refactors the block cost configuration file and adds support for new blocks. The changes include:
- Importing the `AIMusicGeneratorBlock`, `JinaEmbeddingBlock`, and `UnrealTextToSpeechBlock` classes
- Updating the `BLOCK_COSTS` dictionary to include costs for the new blocks

These changes enable the usage of the newly introduced blocks.
@Torantulino Torantulino requested review from a team as code owners November 13, 2024 15:56
@Torantulino Torantulino requested review from Pwuts and kcze and removed request for a team November 13, 2024 15:56
@github-actions github-actions bot added documentation Improvements or additions to documentation platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end platform/blocks labels Nov 13, 2024
Copy link
Contributor

This PR targets the master branch but does not come from dev or a hotfix/* branch.

Automatically setting the base branch to dev.

@github-actions github-actions bot changed the base branch from master to dev November 13, 2024 15:57
Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit c04a699
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/6734cd0dc0836a0008728f63

@github-actions github-actions bot removed documentation Improvements or additions to documentation platform/frontend AutoGPT Platform - Front end platform/blocks labels Nov 13, 2024
@Torantulino Torantulino enabled auto-merge (squash) November 13, 2024 16:02
@Torantulino Torantulino merged commit aafc101 into dev Nov 13, 2024
15 checks passed
@Torantulino Torantulino deleted the toran/secrt-996-update-all-block-costs branch November 13, 2024 16:05
Comment on lines +82 to +88
unreal_credentials = APIKeyCredentials(#
id="66f20754-1b81-48e4-91d0-f4f0dd82145f",
provider="unreal",
api_key=SecretStr(settings.secrets.unreal_speech_api_key),
title="Use Credits for Unreal",
expires_at=None,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be added to the list of hidden credentials in the frontend profile

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/backend AutoGPT Platform - Back end size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants