Skip to content

History & Context

Meloqui can automatically manage conversation history for you.

Auto-Tracking

Provide a conversationId to enable automatic tracking.

typescript
const client = new ChatClient({
  provider: 'openai',
  model: 'gpt-4o',
  conversationId: 'user-session-123'
});

// Context is remembered
await client.chat('My name is Alice');
await client.chat('What is my name?'); // "Alice"

Manual History

You can also access and manipulate history manually:

typescript
const history = await client.getHistory();
await client.clearHistory();

Released under the MIT License.