-
Notifications
You must be signed in to change notification settings - Fork 2.7k
docs: non-interactive compact now #4543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,13 +11,13 @@ import { PanelLeft } from 'lucide-react'; | |
|
|
||
| When working with [Large Language Models (LLMs)](/docs/getting-started/providers), there are limits to how much conversation history they can process at once. Goose provides smart context management features to help handle context and conversation limits so you can maintain productive sessions. Here are some key concepts: | ||
|
|
||
| - **Context Length**: The amount of conversation history the LLM can consider | ||
| - **Context Length**: The amount of conversation history the LLM can consider, also referred to as the context window | ||
| - **Context Limit**: The maximum number of tokens the model can process | ||
| - **Context Management**: How Goose handles conversations approaching these limits | ||
| - **Turn**: One complete prompt-response interaction between Goose and the LLM | ||
|
|
||
| ## How Goose Manages Context | ||
| Goose uses a two-tierd approach to context management: | ||
| Goose uses a two-tiered approach to context management: | ||
|
|
||
| 1. **Auto-Compaction**: Proactively summarizes conversation when approaching token limits | ||
| 2. **Context Strategies**: Backup strategy used if the context limit is still exceeded after auto-compaction | ||
|
|
@@ -37,10 +37,9 @@ export GOOSE_AUTO_COMPACT_THRESHOLD=0.6 | |
| ``` | ||
|
|
||
| When you reach the auto-compaction threshold: | ||
| 1. Goose will automatically start summarizing the conversation to make room. | ||
| 2. You'll see a message that says **"Auto-compacted context: X → Y tokens (Z% reduction)"** | ||
| 3. Once complete, previous messages in your conversation remain visible, but only the summary is included in the active context for Goose. | ||
| 4. Continue the session with the summarized context in place. | ||
| 1. Goose will automatically start compacting the conversation to make room. | ||
| 2. Once complete, you'll see a confirmation message that the conversation was compacted and summarized. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently different messages in Desktop v CLI |
||
| 3. Continue the session. Your previous conversation remains visible, but only the compacted conversion is included in the active context for Goose. | ||
|
|
||
| ### Manual Compaction | ||
| You can also trigger compaction manually before reaching context or token limits: | ||
|
|
@@ -49,12 +48,12 @@ You can also trigger compaction manually before reaching context or token limits | |
| <TabItem value="ui" label="Goose Desktop" default> | ||
|
|
||
| 1. Point to the token usage indicator dot next to the model name at the bottom of the app | ||
| 2. Click <ScrollText className="inline" size={16} /> `Summarize now` in the context window that appears | ||
| 2. Confirm the summarization in the modal | ||
| 3. View or edit the generated summary if needed | ||
| 2. Click <ScrollText className="inline" size={16} /> `Compact now` in the context window that appears | ||
| 3. Once complete, you'll see a confirmation message that the conversation was compacted and summarized. | ||
| 4. Continue the session. Your previous conversation remains visible, but only the compacted conversion is included in the active context for Goose. | ||
|
|
||
| :::note | ||
| Before the scroll icon appears, you must send at least one message in the chat. Simply starting a new session won't trigger it. | ||
| :::info | ||
| You must send at least one message in the chat before the `Compact now` button is enabled. | ||
| ::: | ||
|
|
||
| </TabItem> | ||
|
|
@@ -89,7 +88,7 @@ When auto-compaction is disabled, or if a conversation still exceeds the context | |
| <Tabs groupId="interface"> | ||
| <TabItem value="ui" label="Goose Desktop" default> | ||
|
|
||
| Goose Desktop exclusively uses summarization to manage context, preserving key information while reducing size. | ||
| Goose Desktop exclusively uses summarization by compacting the conversation to manage context, preserving key information while reducing size. | ||
|
|
||
| </TabItem> | ||
| <TabItem value="cli" label="Goose CLI"> | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these terms are used interchangeably