hashbrown

fryHashbrown

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.

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.

@typeTools
Chat.AnyTool
@returns
Hashbrown<string, Tools>

fryHashbrown

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;
}
@typeSchema
s.HashbrownType
@typeTools
Chat.AnyTool
@typeOutput
s.Infer<Schema>
@returns
Hashbrown<Output, Tools>