MCPcopy Create free account
hub / github.com/coder/coder / RegenerateChatTitle

Method RegenerateChatTitle

codersdk/chats.go:3231–3242  ·  view source on GitHub ↗

RegenerateChatTitle requests the server to regenerate the chat's title using richer conversation context.

(ctx context.Context, chatID uuid.UUID)

Source from the content-addressed store, hash-verified

3229// RegenerateChatTitle requests the server to regenerate the chat's
3230// title using richer conversation context.
3231func (c *ExperimentalClient) RegenerateChatTitle(ctx context.Context, chatID uuid.UUID) (Chat, error) {
3232 res, err := c.Request(ctx, http.MethodPost, fmt.Sprintf("/api/experimental/chats/%s/title/regenerate", chatID), nil)
3233 if err != nil {
3234 return Chat{}, err
3235 }
3236 defer res.Body.Close()
3237 if res.StatusCode != http.StatusOK {
3238 return Chat{}, readBodyAsChatUsageLimitError(res)
3239 }
3240 var chat Chat
3241 return chat, json.NewDecoder(res.Body).Decode(&chat)
3242}
3243
3244// ProposeChatTitleResponse is returned by the propose-title endpoint.
3245type ProposeChatTitleResponse struct {

Callers 1

TestRegenerateChatTitleFunction · 0.95

Calls 3

CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1

TestRegenerateChatTitleFunction · 0.76