Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanRunConcurrently ¶
func CanRunConcurrently(invs []tooling.Invocation) bool
CanRunConcurrently reports whether a batch can use the shared runtime concurrently. These tools deliberately remain serialized with any sibling call because they mutate process-wide runtime state while they run.
Types ¶
type Result ¶
Result keeps the result for the invocation at the same index in the input batch. Keeping that association lets callers execute concurrently while still appending tool messages in the order requested by the model.
func Execute ¶
func Execute(ctx context.Context, invs []tooling.Invocation, exec func(context.Context, tooling.Invocation) (any, error)) []Result
Execute starts every invocation in the batch before waiting for any result. The executor is responsible for honoring ctx. A failed invocation does not cancel its siblings: tool failures are represented by the corresponding Result so the model receives one result for every requested tool call.