Class ChatCompletionRequest
Request for generating chat completions from an LLM model.
Inheritance
StreamingGenerativeRequest<ChatCompletionRequest, Message, ChatChoice, Delta<ITextChunk>, ITextRequestOptions>
ChatCompletionRequest
Implements
Inherited Members
GenerativeTextRequest<ChatCompletionRequest, Message, ChatChoice, Delta<ITextChunk>>.StartingMessage
GenerativeTextRequest<ChatCompletionRequest, Message, ChatChoice, Delta<ITextChunk>>.PresencePenalty
GenerativeTextRequest<ChatCompletionRequest, Message, ChatChoice, Delta<ITextChunk>>.RequestMetadata
GenerativeRequest<ChatCompletionRequest, Message, ChatChoice, ITextRequestOptions>.OnLatencyMeasured
UnifiedApiRequestBase<ChatCompletionRequest, Generated<ChatChoice>, ITextRequestOptions>.RequestType
UnifiedApiRequestBase<ChatCompletionRequest, Generated<ChatChoice>, ITextRequestOptions>.HttpOptions
UnifiedApiRequestBase<ChatCompletionRequest, Generated<ChatChoice>, ITextRequestOptions>.ContentType
Namespace: Glitch9.AIDevKit
Assembly: Glitch9.AIDevKit.dll
Syntax
[JsonConverter(typeof(ChatCompletionRequestConverter))]
public sealed class ChatCompletionRequest : ChatCompletionRequestBase<ChatCompletionRequest, Message, ChatChoice>, IStreamingGenerativeRequest<Delta<ITextChunk>, ChatChoice>, IGenerativeTextRequest, IGenerativeRequest
Constructors
| Edit this page View SourceChatCompletionRequest()
Declaration
public ChatCompletionRequest()
ChatCompletionRequest(Message)
Declaration
public ChatCompletionRequest(Message prompt)
Parameters
| Type | Name | Description |
|---|---|---|
| Message | prompt |
Properties
| Edit this page View SourceRequestType
The endpoint type for this
Declaration
public override RequestType RequestType { get; }
Property Value
| Type | Description |
|---|---|
| RequestType |
Overrides
Methods
| Edit this page View SourceExecuteAsyncInternal()
Executes the actual task logic. Must be implemented in derived classes.
Declaration
protected override UniTask<Generated<ChatChoice>> ExecuteAsyncInternal()
Returns
| Type | Description |
|---|---|
| UniTask<Generated<ChatChoice>> |
Overrides
| Edit this page View SourceStreamAsyncInternal()
Declaration
protected override IGenerativeStream<Delta<ITextChunk>, ChatChoice> StreamAsyncInternal()
Returns
| Type | Description |
|---|---|
| IGenerativeStream<Delta<ITextChunk>, ChatChoice> |