Validate providers and retain complete run debugging context
This commit is contained in:
@@ -96,7 +96,7 @@ func (c *Connection) Call(ctx context.Context, method, path string, body any) ([
|
||||
}
|
||||
created, err := c.Native(ctx, "post", "/session", payload)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return created, err
|
||||
}
|
||||
var session struct {
|
||||
ID string `json:"id"`
|
||||
@@ -163,7 +163,7 @@ func (c *Connection) Call(ctx context.Context, method, path string, body any) ([
|
||||
}
|
||||
response, err := c.Native(ctx, "post", "/session/"+id+"/message", payload)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return response, err
|
||||
}
|
||||
c.responses[id] = response
|
||||
if parts[1] == "prompt" {
|
||||
@@ -171,7 +171,7 @@ func (c *Connection) Call(ctx context.Context, method, path string, body any) ([
|
||||
}
|
||||
result, err := messageText(response)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return response, err
|
||||
}
|
||||
return json.Marshal(map[string]any{"data": map[string]string{"text": result}})
|
||||
case "wait":
|
||||
|
||||
Reference in New Issue
Block a user