Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithSystemPrompt ¶
func WithSystemPrompt(prompt string) opt
WithSystemPrompt sets a system prompt that is included in every LLM request.
func WithTranscript ¶
WithTranscript initializes the session with a seed transcript. This can be used to provide context or examples for the conversation. The seed transcript is preserved and can be reset to with the Reset() method.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session tracks conversation state across multiple LLM completions.
func NewSession ¶
NewSession creates a new Session bound to the provided LLM.
func (*Session) Complete ¶
Complete sends the prompt through the underlying LLM and records the exchange.
func (*Session) Reset ¶
func (s *Session) Reset()
Reset clears the conversation history, keeping the initial seed transcript.
func (*Session) Transcript ¶
Transcript returns the current conversation history.
Click to show internal directories.
Click to hide internal directories.