Initialize a Hashbrown chat instance with the given configuration.
API
export declare function fryHashbrown<
Tools extends Chat.AnyTool ,
>(init: {
debugName?: string;
apiUrl?: string;
model: ModelInput ;
system: string;
messages?: Chat.Message <string, Tools>[];
tools?: Tools[];
middleware?: Chat.Middleware [];
structuredOutput?: Chat.Api.StructuredOutputOptions ;
emulateStructuredOutput?: boolean;
debounce?: number;
retries?: number;
transport?: TransportOrFactory ;
ui?: boolean;
threadId?: string;
}): Hashbrown <string, Tools>;fryHashbrown
Hashbrown<string, Tools>@paraminit:{
debugName?: string;
apiUrl?: string;
model: ModelInput;
system: string;
messages?: Chat.Message<string, Tools>[];
tools?: Tools[];
middleware?: Chat.Middleware[];
structuredOutput?: Chat.Api.StructuredOutputOptions;
emulateStructuredOutput?: boolean;
debounce?: number;
retries?: number;
transport?: TransportOrFactory;
ui?: boolean;
threadId?: string;
}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 - structuredOutput: Resource-level structured output mode - 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.SchemaOutput ,
Tools extends Chat.AnyTool ,
Output extends s.InferSchemaOutput <Schema> =
s.InferSchemaOutput <Schema>,
>(init: {
debugName?: string;
apiUrl?: string;
model: ModelInput ;
system: string;
messages?: Chat.Message <Output, Tools>[];
tools?: Tools[];
responseSchema: Schema;
structuredOutput?: Chat.Api.StructuredOutputOptions ;
middleware?: Chat.Middleware [];
emulateStructuredOutput?: boolean;
debounce?: number;
retries?: number;
transport?: TransportOrFactory ;
ui?: boolean;
threadId?: string;
}): Hashbrown <Output, Tools>;fryHashbrown
Hashbrown<Output, Tools>@paraminit:{
debugName?: string;
apiUrl?: string;
model: ModelInput;
system: string;
messages?: Chat.Message<Output, Tools>[];
tools?: Tools[];
responseSchema: Schema;
structuredOutput?: Chat.Api.StructuredOutputOptions;
middleware?: Chat.Middleware[];
emulateStructuredOutput?: boolean;
debounce?: number;
retries?: number;
transport?: TransportOrFactory;
ui?: boolean;
threadId?: string;
}@typeSchemas.SchemaOutput@typeToolsChat.AnyTool@typeOutputs.InferSchemaOutput<Schema>@returnsHashbrown<Output, Tools>