Skip to main content
Conversation maintains message history across turns. You call send() with a user message, and it appends both the user turn and the assistant response to messages — ready for the next turn.

Basic multi-turn

Streaming conversations

Use conv.stream() for token-by-token output with history tracking:

System prompts

The system prompt is prepended to every request — it’s not part of conv.messages.

Controlling generation

Max tokens and temperature set at conversation creation for convenience, or override per turn with client.chat() directly:

Resetting

Clears the full history. Useful when the user starts a new topic or when context gets too long.

Accessing the underlying client

Conversation wraps GatelitClient — you can still use it directly for non-conversation requests: