diff --git a/docs/v2.6.0-alpha/documentation/features/get-context.mdx b/docs/v2.6.0-alpha/documentation/features/get-context.mdx
index a564e9d9..6d1f4e90 100644
--- a/docs/v2.6.0-alpha/documentation/features/get-context.mdx
+++ b/docs/v2.6.0-alpha/documentation/features/get-context.mdx
@@ -6,8 +6,11 @@ icon: 'messages'
The `get_context()` method is a powerful feature that retrieves formatted conversation context from sessions, making it easy to integrate with LLMs like OpenAI, Anthropic, and others. This guide covers everything you need to know about working with session context.
+
+By default, the context includes a blend of summary and messages ***which covers the entire session history of a peer***.
+
-By default, the context includes a blend of summary and messages which covers the entire history of the session. Summaries are automatically generated at intervals and recent messages are included depending on how many tokens the context is intended to be. You can specify any token limit you want, and can disable summaries to fill that limit entirely with recent messages. To get representation data, you need to specify a target peer.
+Summaries are automatically generated at intervals and recent messages are included depending on how many tokens the context is intended to be. You can specify any token limit you want, and can disable summaries to fill that limit entirely with recent messages. To get representation data, you need to specify a target peer.
## Basic Usage
@@ -601,40 +604,24 @@ anthropic_messages = context.to_anthropic(assistant=assistant)
### 3. Error Handling
-Always handle potential errors when working with context:
+Always handle potential errors when retrieving context:
```python Python
try:
context = session.get_context(tokens=2000)
- messages = context.to_openai(assistant=assistant)
-
- # Use messages with LLM API
- response = openai_client.chat.completions.create(
- model="gpt-4",
- messages=messages
- )
-
except Exception as e:
print(f"Error getting context: {e}")
- # Handle error appropriately
+ # Handle error appropriately (fallback to basic context, retry, etc.)
```
```typescript TypeScript
(async () => {
try {
const context = await session.getContext({ tokens: 2000 });
- const messages = context.toOpenAI(assistant);
-
- // Use messages with LLM API
- const response = await openai.chat.completions.create({
- model: "gpt-4",
- messages: messages
- });
-
} catch (error) {
console.error(`Error getting context: ${error}`);
- // Handle error appropriately
+ // Handle error appropriately (fallback to basic context, retry, etc.)
}
})();
```