Class SingleResponseStreamHandler
Inheritance
object
SingleResponseStreamHandler
Implements
ITextStreamHandler
Assembly: .dll
Syntax
public class SingleResponseStreamHandler : ChatCompletionStreamHandler, IChatCompletionStreamHandler, ITextStreamHandler
Constructors
Declaration
public SingleResponseStreamHandler(Action onStart = null, Action<string> onReceiveText = null, Action<string> onReceiveRefusal = null, Action<ToolCall[]> onReceiveToolCalls = null, Action<string> onError = null, Action<ChatCompletion> onDone = null)
Parameters
Type |
Name |
Description |
Action |
onStart |
|
Action<string> |
onReceiveText |
|
Action<string> |
onReceiveRefusal |
|
Action<ToolCall[]> |
onReceiveToolCalls |
|
Action<string> |
onError |
|
Action<ChatCompletion> |
onDone |
|
Fields
onReceiveRefusal
Declaration
public Action<string> onReceiveRefusal
Field Value
Type |
Description |
Action<string> |
|
onReceiveText
Declaration
public Action<string> onReceiveText
Field Value
Type |
Description |
Action<string> |
|
Declaration
public Action<ToolCall[]> onReceiveToolCalls
Field Value
Methods
CreateResult()
Declaration
protected override ChatCompletion CreateResult()
Returns
Overrides
OnReceiveChunk(ChatCompletionChunk)
Declaration
protected override void OnReceiveChunk(ChatCompletionChunk chunk)
Parameters
Overrides
Implements
ITextStreamHandler