ToolScope

org.llm4s.schema.ToolScope
See theToolScope companion class
@Experimental
object ToolScope

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ToolScope.type

Members list

Value members

Concrete methods

def call(using scope: ToolScope): Option[ToolCallInfo]

The call being served, when the caller supplies it (an agent always does); None from plain tool calling.

The call being served, when the caller supplies it (an agent always does); None from plain tool calling.

Attributes

def idempotencyKey(using scope: ToolScope): String

The key to pass to a system with a side effect (an Idempotency-Key header, a client token), so that running the same call again does not repeat the effect: the call's ToolCallInfo.idempotencyKey when it is supplied, which is the same in every run of the call.

The key to pass to a system with a side effect (an Idempotency-Key header, a client token), so that running the same call again does not repeat the effect: the call's ToolCallInfo.idempotencyKey when it is supplied, which is the same in every run of the call.

Without a ToolCallInfo it is derived from the tool's name and the call's arguments (tool- and the SHA-256 of the name and the arguments' JSON with the object keys sorted), so it is the same for equal arguments in any key order: two separate calls with equal arguments then share a key, and a system that honours it runs the second as a repeat of the first.

Attributes