Skip to content

AttributeError: whichOneof vs WhichOneof casing issue in response.text #729

Closed
@mgalore

Description

@mgalore

Description of the bug:

import google.generativeai as genai

Configure with your API key

genai.configure(api_key="YOUR_API_KEY")

Setup model with function calling

model = genai.GenerativeModel(
'gemini-1.5-flash-latest',
tools=[...] # your tool definition
)

Start chat

chat = model.start_chat()

Send a message that triggers function calling

response = chat.send_message("...")

This line causes the error:

print(response.text)

Error: AttributeError: whichOneof. Did you mean: 'WhichOneof'?

Actual vs expected behavior:

AttributeError: whichOneof. Did you mean: 'WhichOneof'?

Any other information you'd like to share?

google-generativeai version: [run pip show google-generativeai]
Python version: [run python --version]
OS: Windows [version]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions