Foundation Models Text Generation API, gRPC: TextGenerationService
Written by
Updated at April 11, 2024
Service for text generation.
Call | Description |
---|---|
Completion | A method for generating text completions in synchronous mode. |
Calls TextGenerationService
Completion
A method for generating text completions in synchronous mode.
rpc Completion (CompletionRequest) returns (stream CompletionResponse)
CompletionRequest
Field | Description |
---|---|
model_uri | string The ID of the model to be used for completion generation. |
completion_options | CompletionOptions Configuration options for completion generation. |
messages[] | Message A list of messages representing the context for the completion model. |
CompletionResponse
Field | Description |
---|---|
alternatives[] | Alternative A list of generated completion alternatives. |
usage | ContentUsage A set of statistics describing the number of content tokens used by the completion model. |
model_version | string The model version changes with each new releases. |