Skip to content

Commit ad627da

Browse files
fix: Resolve type error in executeToolCall function
Convert ToolExecutionResult to string using ui.FormatToolResultForLLM() instead of returning the struct directly. This fixes the typecheck error in the linter. Co-authored-by: Eden Reich <[email protected]>
1 parent 9730dd3 commit ad627da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/prompt.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/inference-gateway/cli/internal/container"
1111
"github.com/inference-gateway/cli/internal/domain"
1212
"github.com/inference-gateway/cli/internal/logger"
13+
"github.com/inference-gateway/cli/internal/ui"
1314
sdk "github.com/inference-gateway/sdk"
1415
"github.com/spf13/cobra"
1516
)
@@ -291,7 +292,7 @@ func (e *BackgroundExecutor) executeToolCall(ctx context.Context, toolCall sdk.C
291292
return "", fmt.Errorf("tool execution failed: %w", err)
292293
}
293294

294-
return result, nil
295+
return ui.FormatToolResultForLLM(result), nil
295296
}
296297

297298

0 commit comments

Comments
 (0)