ToolSchemaCache class
Session-scoped cache of rendered tool schemas.
Tool schemas render at server position 2 (before system prompt), so any byte-level change busts the entire tool block AND everything downstream. Memoizing per-session locks the schema bytes at first render.
Constructors
Properties
-
entries
→ Map<
String, CachedToolSchema> -
Get the full cache map.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int
-
Number of cached schemas.
no setter
Methods
-
clear(
) → void - Clear the entire cache.
-
get(
String name) → CachedToolSchema? - Get a cached schema by tool name.
-
has(
String name) → bool - Check if the cache contains a schema for the given name.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
String name, CachedToolSchema schema) → void - Store a schema in the cache.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited