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

fix: dice.py #624

Merged
merged 1 commit into from
Dec 27, 2024
Merged

fix: dice.py #624

merged 1 commit into from
Dec 27, 2024

Conversation

gnzng
Copy link
Contributor

@gnzng gnzng commented Jul 21, 2024

Adding helper as an additional argument to solve the following issue in dice.py:

Traceback (most recent call last):
  File "/Users/damian/software/chatgpt-telegram-bot/bot/telegram_bot.py", line 697, in prompt
    async for content, tokens in stream_response:
  File "/Users/damian/software/chatgpt-telegram-bot/bot/openai_helper.py", line 184, in get_chat_response_stream
    response, plugins_used = await self.__handle_function_call(chat_id, response, stream=True)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/damian/software/chatgpt-telegram-bot/bot/openai_helper.py", line 310, in __handle_function_call
    function_response = await self.plugin_manager.call_function(function_name, self, arguments)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/damian/software/chatgpt-telegram-bot/bot/plugin_manager.py", line 61, in call_function
    return json.dumps(await plugin.execute(function_name, helper, **json.loads(arguments)), default=str)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DicePlugin.execute() takes 2 positional arguments but 3 were given

@n3d1117
Copy link
Owner

n3d1117 commented Dec 27, 2024

Thanks @gnzng!

@n3d1117 n3d1117 merged commit 09029db into n3d1117:main Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants