import { Orq } from '@orq-ai/node';
const orq = new Orq({ apiKey: process.env.ORQ_API_KEY });
// Create a conversation
const conversation = await orq.conversations.create({
displayName: 'Support Chat #1234',
});
// List all conversations
const { data } = await orq.conversations.list({ limit: 10 });
// Retrieve a specific conversation
const retrieved = await orq.conversations.retrieve(conversation._id);
// Update the display name
await orq.conversations.update(conversation._id, {
displayName: 'Resolved: Support Chat #1234',
});
// Delete when no longer needed
await orq.conversations.delete(conversation._id);