UNPKG

agency-x

Version:

This project is a Claude-compatible, LLM-agnostic sub-agent framework that simulates a complete SaaS product team. It is delivered as a reusable, developer-ready NPM package.

21 lines (17 loc) 481 B
import OpenAI from 'openai'; import * as dotenv from 'dotenv'; dotenv.config(); const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY, }); export const getOpenAIClient = () => { return { generate: async (prompt: string) => { const response = await openai.chat.completions.create({ model: 'gpt-4-turbo-preview', messages: [{ role: 'user', content: prompt }], }); return response.choices[0].message.content || ''; }, }; };