]> git.giacomolli.uk - onechat/blobdiff - chain.go
Check operation context on returned errors
[onechat] / chain.go
index 3ab9fe114e7d4a3d09c459bc7be534ec89d7943c..0211787132ad6c940cfeed0005d2a06c264da3fa 100644 (file)
--- a/chain.go
+++ b/chain.go
@@ -43,7 +43,7 @@ func (c *Chain) Run(ctx context.Context, input []any) (string, error) {
                request.Input = input
                response, err := c.client.Create(ctx, request)
                if err != nil {
-                       return "", err
+                       return "", fmt.Errorf("create model response: %w", err)
                }
 
                var text string