Skip to content

Commit

Permalink
Fix hdrs hint, wrong default type
Browse files Browse the repository at this point in the history
  • Loading branch information
sidewaysthought committed Jun 14, 2023
1 parent 58516c0 commit bb6f3e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/autogpt_plugins/api_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AutoGPTApiTools(AutoGPTPluginTemplate):
def __init__(self):
super().__init__()
self._name = "AutoGPTApiTools"
self._version = "0.1.1"
self._version = "0.1.2"
self._description = "Allow AutoGPT to make API calls to outside services."

self.plugin_class = ApiCallCommand()
Expand Down Expand Up @@ -210,7 +210,7 @@ def post_prompt(self, prompt: PromptGenerator) -> PromptGenerator:
prompt.add_command( # type: ignore
"api",
"API Call",
{"host": "<str>", "endpoint": "<str>", "mthd": "<str>", "params": "<dict>", "body": "<str>", "hdrs": "<list>", "timeout": "<int>"},
{"host": "<str>", "endpoint": "<str>", "mthd": "<str>", "params": "<dict>", "body": "<str>", "hdrs": "<dict>", "timeout": "<int>"},
self.plugin_class.make_api_call
)
return prompt
Expand Down
2 changes: 1 addition & 1 deletion src/autogpt_plugins/api_tools/api_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def make_api_call(self, host = "", endpoint = "", mthd = "GET", params = {}, bod
mthd (str): The HTTP method to use.
params (dict): The query parameters to use.
body (str): The body to use.
hdrs (list): The headers to use.
hdrs (dict): The headers to use.
timeout (int): The timeout to use.
Returns:
Expand Down

0 comments on commit bb6f3e3

Please sign in to comment.