google.generativeai.chat does not support max_output_tokens #48
Labels
component:python sdk
Issue/PR related to Python SDK
type:feature request
New feature request/enhancement
We want to limit the reply length of chat responses, but google.generativeai.chat does not appear to support the
max_output_tokens
parameter. I'm not sure whether this is just not implemented yet, or an API limitation, or something else, but the vertexai Python SDK Chat model appears to support it (see Vertex AI Chat model parameters) and so does the google.generativeai.generate_text function.I had thought that perhaps
max_output_tokens
wasn't supported in chat, just text generation, but this doc clearly shows it being used in a chat:(It's a bit confusing that Google seems to have two different Python SDKs, this google-generativeai one and google-cloud-aiplatform. Is there any difference if all a developer wants to do is send chat to a model and get responses back?)
The text was updated successfully, but these errors were encountered: