Table of Contents

Class ChatCompletionEventHandler

This class has been used with IChatCompletionEventListener, but I have decided to unify the ChatEventListeners to use IResponseEventListener instead. This should mimic the ResponsesAPI event handling.

public class ChatCompletionEventHandler
Inheritance
object
ChatCompletionEventHandler

Constructors

ChatCompletionEventHandler(IGenerativeRequest, IResponsesApiListener)

public ChatCompletionEventHandler(IGenerativeRequest request, IResponsesApiListener listener)

Parameters

request IGenerativeRequest
listener IResponsesApiListener

Fields

m_Request

protected readonly IGenerativeRequest m_Request

Field Value

IGenerativeRequest

Methods

OnCompleteEvent(ChatCompletion)

public void OnCompleteEvent(ChatCompletion cc)

Parameters

cc ChatCompletion

OnError(string)

public void OnError(string error)

Parameters

error string

OnReceiveData(ChatCompletion)

public void OnReceiveData(ChatCompletion cc)

Parameters

cc ChatCompletion