Advanced Parameters & Tuning

LLM endpoint, streaming, SQLite vector store, and agent execution tuning

OpenAICompatibleChat Parameters

ParameterTypeDefaultRange / ValuesDescription
temperaturefloat0.70.0 – 2.0Sampling temperature. 0.0 = deterministic greedy decoding. Higher values increase randomness.
max_tokensint5121 – model contextMaximum tokens to generate per call. Set lower to cap latency on mobile devices.
timeoutfloat60.0> 0HTTP socket timeout in seconds. Increase for large models with slow first-token latency on Android.
top_pfloat1.00.0 – 1.0Nucleus sampling cutoff. Passed through to the backend as-is; not all backends honour it.
stoplist[str][]—Stop sequences. Generation halts when any string in this list is produced.

SQLiteVectorStore Parameters

ParameterTypeDefaultDescription
db_pathstr':memory:'SQLite file path. Use ':memory:' for transient in-process storage; provide a path for persistence across restarts.
dimint384Embedding dimension. Must match the dimension of vectors passed to .add_texts(). Changing this after insertion will cause silently incorrect similarity scores.
metricstr'cosine'Distance metric. Currently only 'cosine' is supported via pure-Python dot-product normalisation.

StateGraph / create_react_agent Parameters

ParameterTypeDefaultDescription
max_iterationsint10Maximum tool-call / state-transition iterations before the agent raises MaxIterationsError. Prevents infinite loops on misbehaving models.
tool_policyToolPolicyToolPolicy(default='deny')default='deny': all tools must be explicitly allowlisted via ToolPolicy(allow=['tool_name']). default='allow': all registered tools are executable without restriction.
verboseboolFalseWhen True, prints each state transition and tool call to stdout. Useful for debugging agent loops on Termux.