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

Function generateTitle

coderd/x/chatd/quickgen.go:430–440  ·  view source on GitHub ↗

generateTitle calls the model with a title-generation system prompt and returns the normalized result. It retries transient LLM errors (rate limits, overloaded, etc.) with exponential backoff.

(
	ctx context.Context,
	model fantasy.LanguageModel,
	input string,
)

Source from the content-addressed store, hash-verified

428// and returns the normalized result. It retries transient LLM errors
429// (rate limits, overloaded, etc.) with exponential backoff.
430func generateTitle(
431 ctx context.Context,
432 model fantasy.LanguageModel,
433 input string,
434) (string, error) {
435 title, err := generateStructuredTitle(ctx, model, titleGenerationPrompt, input)
436 if err != nil {
437 return "", err
438 }
439 return title, nil
440}
441
442func generateStructuredTitle(
443 ctx context.Context,

Callers 1

Calls 1

generateStructuredTitleFunction · 0.85

Tested by

no test coverage detected