diff --git a/docs/source/users/index.md b/docs/source/users/index.md index fcae7bbbc..918170187 100644 --- a/docs/source/users/index.md +++ b/docs/source/users/index.md @@ -785,6 +785,25 @@ A function that computes the lowest common multiples of two integers, and a function that runs 5 test cases of the lowest common multiple function ``` +### Configuring the amount of history to include in the context + +By default, two previous Human/AI message exchanges are included in the context of the new prompt. +You can change this using the IPython `%config` magic, for example: + +```python +%config AiMagics.max_history = 4 +``` + +Note that old messages are still kept locally in memory, +so they will be included in the context of the next prompt after raising the `max_history` value. + +You can configure the value for all notebooks +by specifying `c.AiMagics.max_history` traitlet in `ipython_config.py`, for example: + +```python +c.AiMagics.max_history = 4 +``` + ### Clearing the chat history You can run the `%ai reset` line magic command to clear the chat history. After you do this,