Class ChatCompletionEventHandler
- Namespace
- Glitch9.AIDevKit.ChatCompletions
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
-
objectChatCompletionEventHandler
Constructors
ChatCompletionEventHandler(IGenerativeRequest, IResponsesApiListener)
public ChatCompletionEventHandler(IGenerativeRequest request, IResponsesApiListener listener)
Parameters
requestIGenerativeRequestlistenerIResponsesApiListener
Fields
m_Request
protected readonly IGenerativeRequest m_Request
Field Value
Methods
OnCompleteEvent(ChatCompletion)
public void OnCompleteEvent(ChatCompletion cc)
Parameters
OnError(string)
public void OnError(string error)
Parameters
errorstring
OnReceiveData(ChatCompletion)
public void OnReceiveData(ChatCompletion cc)