xsfetchextra-small Fetch API with auto retry. npmpnpmyarnbunnpm i xsfetch Usage createFetch import { createFetch } from 'xsfetch' const fetch = createFetch({ retry: 3, retryDelay: 1000, }) createFetch with generateText import { generateText } from '@xsai/generate-text' import { env } from 'node:process' import { createFetch } from 'xsfetch' const fetch = createFetch({ retry: 3, retryDelay: 1000, }) const { text } = await generateText({ apiKey: env.OPENAI_API_KEY!, baseURL: 'https://api.openai.com/v1/', fetch, messages: [ { content: 'You\'re a helpful assistant.', role: 'system' }, { content: 'Why is the sky blue?', role: 'user' } ], model: 'gpt-4o', })Edit on GitHubLast updated on xsaiA package containing all the core xsAI tools.xsschemaextra-small, Standard Schema-based alternative to typeschema.