kennethreitz / kennethreitz/simplemind

TypeError when using send_conversation with gemini

Open
#58 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
537
Forks
31
PR merge metrics
No merged PRs in 30d

Description

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

```python
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
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'
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Run examples/translate_text.py with the Gemini provider to reproduce the TypeError. Then inspect simplemind/models.py around Conversation.send and the Gemini.send_conversation entry point shown in the traceback, including logging.py. Done means the example completes without rejecting the tools argument.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.