AIBridgeListSessions returns AI Bridge sessions with the given filter.
(ctx context.Context, filter AIBridgeListSessionsFilter)
| 319 | |
| 320 | // AIBridgeListSessions returns AI Bridge sessions with the given filter. |
| 321 | func (c *Client) AIBridgeListSessions(ctx context.Context, filter AIBridgeListSessionsFilter) (AIBridgeListSessionsResponse, error) { |
| 322 | res, err := c.Request(ctx, http.MethodGet, "/api/v2/aibridge/sessions", nil, filter.asRequestOption(), filter.Pagination.asRequestOption()) |
| 323 | if err != nil { |
| 324 | return AIBridgeListSessionsResponse{}, err |
| 325 | } |
| 326 | defer res.Body.Close() |
| 327 | if res.StatusCode != http.StatusOK { |
| 328 | return AIBridgeListSessionsResponse{}, ReadBodyAsError(res) |
| 329 | } |
| 330 | var resp AIBridgeListSessionsResponse |
| 331 | return resp, json.NewDecoder(res.Body).Decode(&resp) |
| 332 | } |
| 333 | |
| 334 | // AIBridgeGetSessionThreads returns a single session with expanded |
| 335 | // thread details including agentic actions and thinking blocks. |