Class PerplexityResponse
- Namespace
- Glitch9.AIDevKit.Perplexity
public class PerplexityResponse : IChatCompletionEvent, ITextStreamEvent
- Inheritance
-
objectPerplexityResponse
- Implements
-
ITextStreamEvent
- Extension Methods
Properties
Choices
Required. A list of chat completion choices. Can be more than one if n is greater than 1.
public List<PerplexityChoice> Choices { get; set; }
Property Value
- List<PerplexityChoice>
CreatedAt
Required. The Unix timestamp (in seconds) of when the chat completion was created.
public UnixTime CreatedAt { get; set; }
Property Value
- UnixTime
Id
Required. A unique identifier for the chat completion.
public string Id { get; set; }
Property Value
- string
Model
Required. The model that generated the response.
public string Model { get; set; }
Property Value
- string
Object
Required. The type of object, which is always chat.completion.
public string Object { get; set; }
Property Value
- string
SearchResults
A list of search results related to the response.
public List<ApiPublicSearchResult> SearchResults { get; set; }
Property Value
- List<ApiPublicSearchResult>
Usage
Required. Usage statistics and token counts for this completion.
public PerplexityUsage Usage { get; set; }
Property Value
Methods
IsFinal()
public bool IsFinal()
Returns
- bool
ToChatCompletionEvent(string)
public ChatCompletion ToChatCompletionEvent(string args)
Parameters
argsstring
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.