@hashbrownai/react
Version:
React components for Hashbrown AI
24 lines (23 loc) • 588 B
TypeScript
import { RuntimeFunctionRef, RuntimeRef } from '@hashbrownai/core';
/**
* Options for creating a runtime.
*/
export interface UseRuntimeOptions {
/**
* The timeout for the runtime.
*
* @default 10000
*/
timeout?: number;
/**
* The functions that are available in the runtime.
*/
functions: [...RuntimeFunctionRef<any, any>[]];
}
/**
* Creates a new runtime.
*
* @param options - The options for creating the runtime.
* @returns A reference to the runtime.
*/
export declare function useRuntime(options: UseRuntimeOptions): RuntimeRef;