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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix: dice.py #624

wants to merge 1 commit into from

Conversation

gnzng
Copy link

@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

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.

1 participant