MCPcopy Index your code
hub / github.com/coder/coder / AIBridgeListClients

Method AIBridgeListClients

codersdk/aibridge.go:362–373  ·  view source on GitHub ↗

AIBridgeListClients returns the distinct AI clients visible to the caller.

(ctx context.Context)

Source from the content-addressed store, hash-verified

360
361// AIBridgeListClients returns the distinct AI clients visible to the caller.
362func (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
375type GroupAIBudget struct {
376 GroupID uuid.UUID `json:"group_id" format:"uuid"`

Callers 1

TestAIBridgeListClientsFunction · 0.80

Calls 3

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65

Tested by 1

TestAIBridgeListClientsFunction · 0.64