mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
added explination in cost_integration
This commit is contained in:
@@ -43,6 +43,9 @@ def register_provider_costs_for_block(block_class: Type[Block]) -> None:
|
||||
return
|
||||
|
||||
# Look for credentials fields
|
||||
# The cost system works of filtering on credentials fields,
|
||||
# without credentials fields, we can not apply costs
|
||||
# TODO: Improve cost system to allow for costs witout a provider
|
||||
credentials_fields = input_schema.get_credentials_fields()
|
||||
if not credentials_fields:
|
||||
logger.debug(f"Block {block_class.__name__} has no credentials fields")
|
||||
|
||||
@@ -23,7 +23,7 @@ class OAuthConfig(BaseModel):
|
||||
|
||||
class Provider:
|
||||
"""A configured provider that blocks can use.
|
||||
|
||||
|
||||
A Provider represents a service or platform that blocks can integrate with, like Linear, OpenAI, etc.
|
||||
It contains configuration for:
|
||||
- Authentication (OAuth, API keys)
|
||||
@@ -32,7 +32,7 @@ class Provider:
|
||||
- Webhook handling
|
||||
- Error handling
|
||||
- API client factory
|
||||
|
||||
|
||||
Blocks use Provider instances to handle authentication, make API calls, and manage service-specific logic.
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user