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

Method GetUserChatCompactionThresholds

codersdk/chats.go:2763–2774  ·  view source on GitHub ↗

GetUserChatCompactionThresholds fetches the user's per-model chat compaction thresholds.

(ctx context.Context)

Source from the content-addressed store, hash-verified

2761// GetUserChatCompactionThresholds fetches the user's per-model chat
2762// compaction thresholds.
2763func (c *ExperimentalClient) GetUserChatCompactionThresholds(ctx context.Context) (UserChatCompactionThresholds, error) {
2764 res, err := c.Request(ctx, http.MethodGet, "/api/experimental/chats/config/user-compaction-thresholds", nil)
2765 if err != nil {
2766 return UserChatCompactionThresholds{}, err
2767 }
2768 defer res.Body.Close()
2769 if res.StatusCode != http.StatusOK {
2770 return UserChatCompactionThresholds{}, ReadBodyAsError(res)
2771 }
2772 var thresholds UserChatCompactionThresholds
2773 return thresholds, json.NewDecoder(res.Body).Decode(&thresholds)
2774}
2775
2776// UpdateUserChatCompactionThreshold updates the user's per-model chat
2777// compaction threshold.

Callers 1

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1