NewToolExecutor creates a new tool executor
(productService *ProductService, cartService *CartService)
| 17 | |
| 18 | // NewToolExecutor creates a new tool executor |
| 19 | func 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 |
| 27 | func (te *ToolExecutor) ExecuteToolCalls(ctx context.Context, toolCalls []openai.ChatCompletionMessageToolCall, sessionID string) ([]models.ToolCallResult, error) { |
no outgoing calls
no test coverage detected