our friendly logo that looks like a hashbrown character from an animated tv showhashbrown

@hashbrownai/reactuseCompletion

This React hook creates a change instance used to interact with the LLM. The result object contains functions and state enabling you to send and recieve messages and monitor the state of the chat.

The useCompletion hook provides functionality for completing unstructured inputs with predicted unstructured outputs. This is useful for things like natural language autocompletions.

function useCompletion<Input>(
options: UseCompletionOptions<Input>): UseCompletionResult;
@paramoptions
UseCompletionOptions<Input>
@typeInput
@returns
UseCompletionResult

Examples

const { output } = useCompletion({
  model: 'gpt-4o-mini',
  input: firstName,
  system: `Help the user generate a last name for the given first name.`,
});

LiveLoveApp provides secure, compliant, and reliable long-term support to enterprises. We are a group of engineers who are passionate about open source.

Enterprise Support

AI Engineering Sprint

Get your team up-to-speed on AI engineering with a one week AI engineering sprint. Includes a workshop on AI engineering with hashbrown and a few days with the hashbrown developer team to bring your AI ideas to life.

Long Term Support

Keep your hashbrown deployments running at peak performance with our Long Term Support. Includes an ongoing support retainer for direct access to the hashbrown developer team, SLA-backed issue resolution, and guided upgrades.

Consulting

LiveLoveApp provides hands-on engagement with our AI engineers for architecture reviews, custom integrations, proof-of-concept builds, performance tuning, and expert guidance on best practices.