AIBridgeListClients returns the distinct AI clients visible to the caller.
(ctx context.Context)
| 360 | |
| 361 | // AIBridgeListClients returns the distinct AI clients visible to the caller. |
| 362 | func (c *Client) AIBridgeListClients(ctx context.Context) ([]string, error) { |
| 363 | res, err := c.Request(ctx, http.MethodGet, "/api/v2/aibridge/clients", nil) |
| 364 | if err != nil { |
| 365 | return nil, err |
| 366 | } |
| 367 | defer res.Body.Close() |
| 368 | if res.StatusCode != http.StatusOK { |
| 369 | return nil, ReadBodyAsError(res) |
| 370 | } |
| 371 | var clients []string |
| 372 | return clients, json.NewDecoder(res.Body).Decode(&clients) |
| 373 | } |
| 374 | |
| 375 | type GroupAIBudget struct { |
| 376 | GroupID uuid.UUID `json:"group_id" format:"uuid"` |