useAI
签名
function useAI(
prompt: string,
options?: {
creativity?: AI.Creativity;
model?: AI.Model;
stream?: boolean;
execute?: boolean;
onError?: (error: Error) => void;
onData?: (data: T) => void;
onWillExecute?: (args: string[]) -> void;
}
): AsyncState<String> & {
revalidate: () => void;
};参数
返回
例子
类型
AsyncState
最后更新于