Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

add rules and max tokens to llm docs (#7358)

Shahmir Varqha38f3014452b4
diff --git a/docs/guides/configuration/llm_providers.md b/docs/guides/configuration/llm_providers.md
index 683e6f582b..fe33cefa2b 100644
--- a/docs/guides/configuration/llm_providers.md
+++ b/docs/guides/configuration/llm_providers.md
@@ -40,6 +40,18 @@ Add custom entries to the model dropdown:
custom_models = ["ollama/somemodel"]
```
+## Rules and Max tokens
+
+Add custom rules or set the maximum number of tokens that the AI model can use.
+
+```toml title="marimo.toml"
+[ai]
+rules = """
+- Always use type hints; prefer polars over pandas
+"""
+max_tokens = 1000
+```
+
## Supported providers
<div align="center">