@ai-sdk/svelte
Version:
[Svelte](https://svelte.dev/) UI components for the [AI SDK](https://ai-sdk.dev/docs):
17 lines (14 loc) • 449 B
text/typescript
import {
KeyedCompletionStore,
setCompletionContext,
} from './completion-context.svelte.js';
import {
KeyedStructuredObjectStore,
setStructuredObjectContext,
} from './structured-object-context.svelte.js';
export function createAIContext() {
const completionStore = new KeyedCompletionStore();
setCompletionContext(completionStore);
const objectStore = new KeyedStructuredObjectStore();
setStructuredObjectContext(objectStore);
}