Advanced Parameters & Tuning
LLM endpoint, streaming, SQLite vector store, and agent execution tuning
OpenAICompatibleChat Parameters
| Parameter | Type | Default | Range / Values | Description |
temperature | float | 0.7 | 0.0 – 2.0 | Sampling temperature. 0.0 = deterministic greedy decoding. Higher values increase randomness. |
max_tokens | int | 512 | 1 – model context | Maximum tokens to generate per call. Set lower to cap latency on mobile devices. |
timeout | float | 60.0 | > 0 | HTTP socket timeout in seconds. Increase for large models with slow first-token latency on Android. |
top_p | float | 1.0 | 0.0 – 1.0 | Nucleus sampling cutoff. Passed through to the backend as-is; not all backends honour it. |
stop | list[str] | [] | — | Stop sequences. Generation halts when any string in this list is produced. |
SQLiteVectorStore Parameters
| Parameter | Type | Default | Description |
db_path | str | ':memory:' | SQLite file path. Use ':memory:' for transient in-process storage; provide a path for persistence across restarts. |
dim | int | 384 | Embedding dimension. Must match the dimension of vectors passed to .add_texts(). Changing this after insertion will cause silently incorrect similarity scores. |
metric | str | 'cosine' | Distance metric. Currently only 'cosine' is supported via pure-Python dot-product normalisation. |
StateGraph / create_react_agent Parameters
| Parameter | Type | Default | Description |
max_iterations | int | 10 | Maximum tool-call / state-transition iterations before the agent raises MaxIterationsError. Prevents infinite loops on misbehaving models. |
tool_policy | ToolPolicy | ToolPolicy(default='deny') | default='deny': all tools must be explicitly allowlisted via ToolPolicy(allow=['tool_name']). default='allow': all registered tools are executable without restriction. |
verbose | bool | False | When True, prints each state transition and tool call to stdout. Useful for debugging agent loops on Termux. |