Initialize a Hashbrown chat instance with the given configuration.
@template Output - The type of messages expected from the LLM. @template Tools - The set of tools to register with the chat instance.
function fryHashbrown<Tools extends Chat.AnyTool>(init: {
debugName?: string;
apiUrl: string;
model: string;
system: string;
messages?: Chat.Message<string, Tools>[];
tools?: Tools[];
middleware?: Chat.Middleware[];
emulateStructuredOutput?: boolean;
debounce?: number;
retries?: number;
}): Hashbrown<string, Tools>;
@param
init
Initialization options.
{
debugName?: string;
apiUrl: string;
model: string;
system: string;
messages?: Chat.Message<string, Tools>[];
tools?: Tools[];
middleware?: Chat.Middleware[];
emulateStructuredOutput?: boolean;
debounce?: number;
retries?: number;
}
@type
Tools
Chat.AnyTool
@returns
Hashbrown<string, Tools>