Skip to content

Commit

Permalink
slips of the pen (bloopers) in autogpt/core part of the repo (Signifi…
Browse files Browse the repository at this point in the history
…cant-Gravitas#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 <[email protected]>
Co-authored-by: Nicholas Tindle <[email protected]>
  • Loading branch information
3 people authored Aug 1, 2023
1 parent ad18f77 commit c8914eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions autogpt/core/ability/base.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -50,11 +50,11 @@ def required_arguments(cls) -> list[str]:
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 {
Expand Down Expand Up @@ -88,5 +88,5 @@ def get_ability(self, ability_name: str) -> Ability:
...

@abc.abstractmethod
def perform(self, ability_name: str, **kwargs) -> AbilityResult:
async def perform(self, ability_name: str, **kwargs: Any) -> AbilityResult:
...
2 changes: 1 addition & 1 deletion autogpt/core/resource/model_providers/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class OpenAIModelProviderBudget(ModelProviderBudget):

class OpenAISettings(ModelProviderSettings):
configuration: OpenAIConfiguration
credentials: ModelProviderCredentials()
credentials: ModelProviderCredentials
budget: OpenAIModelProviderBudget


Expand Down

0 comments on commit c8914eb

Please sign in to comment.