MCPcopy Create free account
hub / github.com/docker/model-test / NewToolExecutor

Function NewToolExecutor

services/tool_executor.go:19–24  ·  view source on GitHub ↗

NewToolExecutor creates a new tool executor

(productService *ProductService, cartService *CartService)

Source from the content-addressed store, hash-verified

17
18// NewToolExecutor creates a new tool executor
19func NewToolExecutor(productService *ProductService, cartService *CartService) *ToolExecutor {
20 return &ToolExecutor{
21 productService: productService,
22 cartService: cartService,
23 }
24}
25
26// ExecuteToolCalls executes the tool calls from OpenAI
27func (te *ToolExecutor) ExecuteToolCalls(ctx context.Context, toolCalls []openai.ChatCompletionMessageToolCall, sessionID string) ([]models.ToolCallResult, error) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected