Skip to content

TypeError when using send_conversation with gemini #58

@gabrielmotaa

Description

@gabrielmotaa

When running the "examples/translate_text.py" using gemini as the LLM provider a TypeError is raised:

import simplemind as sm


def translate_to_french(text: str) -> str:
    conversation = sm.create_conversation(llm_provider="gemini")

    conversation.add_message(
        "user", f"Translate the following text to French: {text!r}"
    )
    return conversation.send().text


print(translate_to_french("an omlette with cheese"))

Output:

Traceback (most recent call last):
  File "/home/gabrielmota/Projects/aifun/script.py", line 13, in <module>
    print(translate_to_french("an omlette with changes"))
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gabrielmota/Projects/aifun/script.py", line 10, in translate_to_french
    return conversation.send().text
           ~~~~~~~~~~~~~~~~~^^
  File "/home/gabrielmota/Projects/aifun/.venv/lib64/python3.13/site-packages/simplemind/models.py", line 185, in send
    response = provider.send_conversation(self, tools=tools)
  File "/home/gabrielmota/Projects/aifun/.venv/lib64/python3.13/site-packages/simplemind/logging.py", line 16, in wrapper
    return func(*args, **kwargs)
TypeError: Gemini.send_conversation() got an unexpected keyword argument 'tools'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions