Open umstek opened 10 hours ago
When calling the complete method returned by useCompletion (etc.), we can pass our own data like so:
useCompletion
const { complete, completion, error, isLoading, } = useCompletion({ api: `${config.baseURL}/ai/completion`, });
await complete(promptText, { body: { model: 'fast' } });
Currently, useCompletion doesn't accept type arguments. If it did, we could've made the body passed to complete type safe.
complete
This would help us avoid mistakes.
This is definitely not a high priority, but I believe it is a nice to have.
Feature Description
When calling the complete method returned by
useCompletion
(etc.), we can pass our own data like so:Currently,
useCompletion
doesn't accept type arguments. If it did, we could've made the body passed tocomplete
type safe.Use Cases
This would help us avoid mistakes.
Additional context
This is definitely not a high priority, but I believe it is a nice to have.