mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
slips of the pen (bloopers) in autogpt/core part of the repo (#5045)
* fix omitted "()" in __str__(self) in core/ability/base.py * put back async keyword in the base class * Remove extra () in OpenAISettings class in autogpt/core/resourece/model_providers/openai.py --------- Co-authored-by: James Collins <collijk@uw.edu> Co-authored-by: Nicholas Tindle <nick@ntindle.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import abc
|
||||
from pprint import pformat
|
||||
from typing import ClassVar
|
||||
from typing import Any, ClassVar
|
||||
|
||||
import inflection
|
||||
from pydantic import Field
|
||||
@@ -50,11 +50,11 @@ class Ability(abc.ABC):
|
||||
return []
|
||||
|
||||
@abc.abstractmethod
|
||||
async def __call__(self, *args, **kwargs) -> AbilityResult:
|
||||
async def __call__(self, *args: Any, **kwargs: Any) -> AbilityResult:
|
||||
...
|
||||
|
||||
def __str__(self) -> str:
|
||||
return pformat(self.dump)
|
||||
return pformat(self.dump())
|
||||
|
||||
def dump(self) -> dict:
|
||||
return {
|
||||
@@ -88,5 +88,5 @@ class AbilityRegistry(abc.ABC):
|
||||
...
|
||||
|
||||
@abc.abstractmethod
|
||||
def perform(self, ability_name: str, **kwargs) -> AbilityResult:
|
||||
async def perform(self, ability_name: str, **kwargs: Any) -> AbilityResult:
|
||||
...
|
||||
|
||||
@@ -109,7 +109,7 @@ class OpenAIModelProviderBudget(ModelProviderBudget):
|
||||
|
||||
class OpenAISettings(ModelProviderSettings):
|
||||
configuration: OpenAIConfiguration
|
||||
credentials: ModelProviderCredentials()
|
||||
credentials: ModelProviderCredentials
|
||||
budget: OpenAIModelProviderBudget
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user