Skip to content

Overview / NewTokenHandler

NewTokenHandler

Extends

  • BaseCallbackHandler

Constructors

new NewTokenHandler()

new NewTokenHandler(stray, input?): NewTokenHandler

Parameters

ParameterType
strayStrayCat
input?BaseCallbackHandlerInput

Returns

NewTokenHandler

Overrides

BaseCallbackHandler.constructor

Properties

PropertyTypeDefault valueOverrides
namestring'NewToken'BaseCallbackHandler.name

Methods

handleLLMNewToken()

handleLLMNewToken(token): void

Called when an LLM/ChatModel in streaming mode produces a new token

Parameters

ParameterType
tokenstring

Returns

void

Overrides

BaseCallbackHandler.handleLLMNewToken

Released under the GPL-3.0 License.