@Generated(value="OracleSDKGenerator", comments="API Version: 20231130") public final class CohereChatResponse extends BaseChatResponse
The response to the chat conversation.
Note: Objects should always be created or deserialized using the CohereChatResponse.Builder
. This model
distinguishes fields that are null
because they are unset from fields that are explicitly
set to null
. This is done in the setter methods of the CohereChatResponse.Builder
, which maintain a
set of all explicitly set fields called CohereChatResponse.Builder.__explicitlySet__
. The hashCode()
and equals(Object)
methods are implemented to take the explicitly set
fields into account. The constructor, on the other hand, does not take the explicitly set fields
into account (since the constructor cannot distinguish explicit null
from unset null
).
Modifier and Type | Class and Description |
---|---|
static class |
CohereChatResponse.Builder |
static class |
CohereChatResponse.FinishReason
Why the generation was completed.
|
BaseChatResponse.ApiFormat
EXPLICITLY_SET_FILTER_NAME, EXPLICITLY_SET_PROPERTY_NAME
Constructor and Description |
---|
CohereChatResponse(String text,
List<Citation> citations,
Boolean isSearchRequired,
CohereChatResponse.FinishReason finishReason,
List<SearchQuery> searchQueries,
List<Object> documents)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static CohereChatResponse.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
List<Citation> |
getCitations()
Inline citations for the generated reply.
|
List<Object> |
getDocuments()
Documents seen by the model when generating the reply.
|
CohereChatResponse.FinishReason |
getFinishReason()
Why the generation was completed.
|
Boolean |
getIsSearchRequired()
Denotes that a search for documents is required.
|
List<SearchQuery> |
getSearchQueries()
Generated search queries.
|
String |
getText()
Contents of the reply generated by the model.
|
int |
hashCode() |
CohereChatResponse.Builder |
toBuilder() |
String |
toString() |
String |
toString(boolean includeByteArrayContents)
Return a string representation of the object.
|
markPropertyAsExplicitlySet, wasPropertyExplicitlySet
@Deprecated public CohereChatResponse(String text, List<Citation> citations, Boolean isSearchRequired, CohereChatResponse.FinishReason finishReason, List<SearchQuery> searchQueries, List<Object> documents)
public static CohereChatResponse.Builder builder()
Create a new builder.
public CohereChatResponse.Builder toBuilder()
public String getText()
Contents of the reply generated by the model.
public List<Citation> getCitations()
Inline citations for the generated reply.
public Boolean getIsSearchRequired()
Denotes that a search for documents is required.
public CohereChatResponse.FinishReason getFinishReason()
Why the generation was completed.
public List<SearchQuery> getSearchQueries()
Generated search queries.
public List<Object> getDocuments()
Documents seen by the model when generating the reply. Each document is a JSON String representing the field and values of the document.
public String toString()
toString
in class BaseChatResponse
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
toString
in class BaseChatResponse
includeByteArrayContents
- true to include the full contents of byte arrayspublic boolean equals(Object o)
equals
in class BaseChatResponse
public int hashCode()
hashCode
in class BaseChatResponse
Copyright © 2016–2024. All rights reserved.