Completions Class
- java.
lang. Object - com.
azure. ai. openai. models. Completions
- com.
Implements
public final class Completions
implements JsonSerializable<Completions>
Representation of the response data from a completions request. Completions support a wide variety of tasks and generate text that continues from or "completes" provided prompt data.
Method Summary
Modifier and Type | Method and Description |
---|---|
static Completions |
fromJson(JsonReader jsonReader)
Reads an instance of Completions from the Json |
List<Choice> |
getChoices()
Get the choices property: The collection of completions choices associated with this completions response. |
Offset |
getCreatedAt()
Get the created |
String |
getId()
Get the id property: A unique identifier associated with this completions response. |
List<Content |
getPromptFilterResults()
Get the prompt |
String |
getSystemFingerprint()
Get the system |
Completions |
getUsage()
Get the usage property: Usage information for tokens processed and generated as part of this completions operation. |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Method Details
fromJson
public static Completions fromJson(JsonReader jsonReader)
Reads an instance of Completions from the JsonReader.
Parameters:
Returns:
Throws:
getChoices
public List
Get the choices property: The collection of completions choices associated with this completions response. Generally, `n` choices are generated per provided prompt with a default value of 1. Token limits and other settings may limit the number of choices generated.
Returns:
getCreatedAt
public OffsetDateTime getCreatedAt()
Get the createdAt property: The first timestamp associated with generation activity for this completions response, represented as seconds since the beginning of the Unix epoch of 00:00 on 1 Jan 1970.
Returns:
getId
public String getId()
Get the id property: A unique identifier associated with this completions response.
Returns:
getPromptFilterResults
public List
Get the promptFilterResults property: Content filtering results for zero or more prompts in the request. In a streaming request, results for different prompts may arrive at different times or in different orders.
Returns:
getSystemFingerprint
public String getSystemFingerprint()
Get the systemFingerprint property: This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
Returns:
getUsage
public CompletionsUsage getUsage()
Get the usage property: Usage information for tokens processed and generated as part of this completions operation.
Returns:
toJson
Applies to
Azure SDK for Java