UtilsChat npmpnpmyarnbunnpm i @xsai/utils-chat Examples messages util to easy create messages. import { generateText } from '@xsai/generate-text' import { message } from '@xsai/utils-chat' import { env } from 'node:process' const { text } = await generateText({ apiKey: env.OPENAI_API_KEY!, baseURL: 'https://api.openai.com/v1/', messages: [ { content: 'You\'re a helpful assistant.', role: 'system' }, message.system('You\'re a helpful assistant.'), { content: 'Why is the sky blue?', role: 'user' }, message.user('Why is the sky blue?'), ], model: 'gpt-4o', })Edit on GitHubLast updated on EmbeddingsGet a vector representation of a given input.NextStream