@ai-sdk/svelte
Version: 
[Svelte](https://svelte.dev/) UI components for the [AI SDK](https://ai-sdk.dev/docs):
9 lines (8 loc) • 447 B
JavaScript
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);
}