Show / Hide Table of Contents

Class CohereChatResponse

The response to the chat conversation.

Inheritance
object
BaseChatResponse
CohereChatResponse
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.GenerativeaiinferenceService.Models
Assembly: OCI.DotNetSDK.Generativeaiinference.dll
Syntax
public class CohereChatResponse : BaseChatResponse

Properties

ChatHistory

Declaration
[JsonProperty(PropertyName = "chatHistory")]
public List<CohereMessage> ChatHistory { get; set; }
Property Value
Type Description
List<CohereMessage>

The list of previous messages between the user and the model. The chat history gives the model context for responding to the user's inputs.

Citations

Declaration
[JsonProperty(PropertyName = "citations")]
public List<Citation> Citations { get; set; }
Property Value
Type Description
List<Citation>

Inline citations for the generated response.

Documents

Declaration
[JsonProperty(PropertyName = "documents")]
public List<object> Documents { get; set; }
Property Value
Type Description
List<object>

The documents that the model can refer to when generating a response. Each document is a JSON string that represents the field and values of the document.
Example: '[ { "id": "doc_0", "snippet": "Emperor penguins are the tallest.", "title": "Tall penguins" }, { "id": "doc_1", "snippet": "Emperor penguins only live in Antarctica.", "title": "Penguin habitats" }]'

ErrorMessage

Declaration
[JsonProperty(PropertyName = "errorMessage")]
public string ErrorMessage { get; set; }
Property Value
Type Description
string

If there is an error during the streaming scenario, then the errorMessage parameter contains details for the error.

FinishReason

Declaration
[Required(ErrorMessage = "FinishReason is required.")]
[JsonProperty(PropertyName = "finishReason")]
[JsonConverter(typeof(ResponseEnumConverter))]
public CohereChatResponse.FinishReasonEnum? FinishReason { get; set; }
Property Value
Type Description
CohereChatResponse.FinishReasonEnum?

Why the generation stopped.

Remarks

Required

IsSearchRequired

Declaration
[JsonProperty(PropertyName = "isSearchRequired")]
public bool? IsSearchRequired { get; set; }
Property Value
Type Description
bool?

If set to true, a search for documents is required.

Prompt

Declaration
[JsonProperty(PropertyName = "prompt")]
public string Prompt { get; set; }
Property Value
Type Description
string

The full prompt that was sent to the model if isEcho is true when request.

SearchQueries

Declaration
[JsonProperty(PropertyName = "searchQueries")]
public List<SearchQuery> SearchQueries { get; set; }
Property Value
Type Description
List<SearchQuery>

The generated search queries.

Text

Declaration
[Required(ErrorMessage = "Text is required.")]
[JsonProperty(PropertyName = "text")]
public string Text { get; set; }
Property Value
Type Description
string

Contents of the response that the model generates.

Remarks

Required

ToolCalls

Declaration
[JsonProperty(PropertyName = "toolCalls")]
public List<CohereToolCall> ToolCalls { get; set; }
Property Value
Type Description
List<CohereToolCall>

A list of tool calls generated by the model.

Usage

Declaration
[JsonProperty(PropertyName = "usage")]
public Usage Usage { get; set; }
Property Value
Type Description
Usage
In this article
Back to top