The PaLM API is deprecated for use with Google AI services and tools (but
not for Vertex AI). Learn more about this deprecation, its timeline, and how to migrate to use Gemini in the
PaLM API deprecation guide .
Send feedback
google.generativeai.types.Completion
Stay organized with collections
Save and categorize content based on your preferences.
The result returned by generativeai.generate_text
.
Use GenerateTextResponse.candidates
to access all the completions generated by the model.
Attributes
candidates
A list of candidate text completions generated by the model.
result
The output of the first candidate,
filters
Indicates the reasons why content may have been blocked.
See types.BlockedReason
.
safety_feedback
Indicates which safety settings blocked content in this result.
Methods
to_dict
View source
to_dict() -> Dict[str, Any]
__eq__
__eq__(
other
)
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-02-15 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?