GetChatDebugRun returns a single debug run along with its full step history. Use GetChatDebugRuns when only the run summary list is needed.
(ctx context.Context, chatID uuid.UUID, runID uuid.UUID)
| 3030 | // GetChatDebugRun returns a single debug run along with its full step |
| 3031 | // history. Use GetChatDebugRuns when only the run summary list is needed. |
| 3032 | func (c *ExperimentalClient) GetChatDebugRun(ctx context.Context, chatID uuid.UUID, runID uuid.UUID) (ChatDebugRun, error) { |
| 3033 | res, err := c.Request(ctx, http.MethodGet, fmt.Sprintf("/api/experimental/chats/%s/debug/runs/%s", chatID, runID), nil) |
| 3034 | if err != nil { |
| 3035 | return ChatDebugRun{}, err |
| 3036 | } |
| 3037 | defer res.Body.Close() |
| 3038 | if res.StatusCode != http.StatusOK { |
| 3039 | return ChatDebugRun{}, ReadBodyAsError(res) |
| 3040 | } |
| 3041 | var resp ChatDebugRun |
| 3042 | return resp, json.NewDecoder(res.Body).Decode(&resp) |
| 3043 | } |
| 3044 | |
| 3045 | // GetChat returns a chat by ID. |
| 3046 | func (c *ExperimentalClient) GetChat(ctx context.Context, chatID uuid.UUID) (Chat, error) { |