GetChatDebugRuns returns the debug runs for a chat.
(ctx context.Context, chatID uuid.UUID)
| 3015 | |
| 3016 | // GetChatDebugRuns returns the debug runs for a chat. |
| 3017 | func (c *ExperimentalClient) GetChatDebugRuns(ctx context.Context, chatID uuid.UUID) ([]ChatDebugRunSummary, error) { |
| 3018 | res, err := c.Request(ctx, http.MethodGet, fmt.Sprintf("/api/experimental/chats/%s/debug/runs", chatID), nil) |
| 3019 | if err != nil { |
| 3020 | return nil, err |
| 3021 | } |
| 3022 | defer res.Body.Close() |
| 3023 | if res.StatusCode != http.StatusOK { |
| 3024 | return nil, ReadBodyAsError(res) |
| 3025 | } |
| 3026 | var resp []ChatDebugRunSummary |
| 3027 | return resp, json.NewDecoder(res.Body).Decode(&resp) |
| 3028 | } |
| 3029 | |
| 3030 | // GetChatDebugRun returns a single debug run along with its full step |
| 3031 | // history. Use GetChatDebugRuns when only the run summary list is needed. |