chat-with-ai
v1.0.0
Published
Simple AI chat package for Node.js
Downloads
129
Maintainers
Readme
AI Chat
A lightweight Node.js package to interact with OpenAI-compatible chat APIs.
Installation
npm install ai-chatUsage
const AIChat = require("ai-chat");
const ai = new AIChat({
apiKey: "YOUR_API_KEY"
});
(async () => {
const reply = await ai.chat("Hello");
console.log(reply);
})();Options
new AIChat({
apiKey: "...",
model: "gpt-4.1-mini",
baseURL: "https://api.openai.com/v1/chat/completions"
});License
MIT
