Initialize a Hashbrown chat instance with the given configuration.
API
export declare function fryHashbrown<
Tools extends Chat.AnyTool ,
>(init: {
debugName?: string;
apiUrl: string;
model: KnownModelIds ;
system: string;
messages?: Chat.Message <string, Tools>[];
tools?: Tools[];
middleware?: Chat.Middleware [];
emulateStructuredOutput?: boolean;
debounce?: number;
retries?: number;
}): Hashbrown <string, Tools>;fryHashbrown
Hashbrown<string, Tools>@paraminit:{
debugName?: string;
apiUrl: string;
model: KnownModelIds;
system: string;
messages?: Chat.Message<string, Tools>[];
tools?: Tools[];
middleware?: Chat.Middleware[];
emulateStructuredOutput?: boolean;
debounce?: number;
retries?: number;
}Initialization options containing: - debugName: Optional debug name for devtools tracing - apiUrl: Base URL of the Hashbrown API endpoint - model: The LLM model identifier to use - system: System prompt or initial context for the chat - messages: Initial message history - tools: Array of tools to enable in the instance - responseSchema: JSON schema for validating structured output - middleware: Middleware functions to run on messages - emulateStructuredOutput: Whether to emulate structured output behavior - debounce: Debounce interval in milliseconds for sending messages
@typeToolsChat.AnyTool@returnsHashbrown<string, Tools>API
export declare function fryHashbrown<
Schema extends s.HashbrownType ,
Tools extends Chat.AnyTool ,
Output extends
s.Infer <Schema> = s.Infer <Schema>,
>(init: {
debugName?: string;
apiUrl: string;
model: KnownModelIds ;
system: string;
messages?: Chat.Message <Output, Tools>[];
tools?: Tools[];
responseSchema: Schema;
middleware?: Chat.Middleware [];
emulateStructuredOutput?: boolean;
debounce?: number;
retries?: number;
}): Hashbrown <Output, Tools>;fryHashbrown
Hashbrown<Output, Tools>@paraminit:{
debugName?: string;
apiUrl: string;
model: KnownModelIds;
system: string;
messages?: Chat.Message<Output, Tools>[];
tools?: Tools[];
responseSchema: Schema;
middleware?: Chat.Middleware[];
emulateStructuredOutput?: boolean;
debounce?: number;
retries?: number;
}@typeSchemas.HashbrownType@typeToolsChat.AnyTool@typeOutputs.Infer<Schema>@returnsHashbrown<Output, Tools>