Documentation
¶
Overview ¶
Package sessiontitle provides session title generation using a one-shot LLM call. It is designed to be independent of pkg/runtime to avoid circular dependencies and the overhead of spinning up a nested runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates session titles using a one-shot LLM completion.
func (*Generator) Generate ¶
func (g *Generator) Generate(ctx context.Context, sessionID string, userMessages []string) (string, error)
Generate produces a title for a session based on the provided user messages. It performs a one-shot LLM call directly via the provider's CreateChatCompletionStream, avoiding the overhead of spinning up a nested runtime. Returns an empty string if generation fails or no messages are provided.
Click to show internal directories.
Click to hide internal directories.