Documentation
¶
Index ¶
- func AppendToolRound(messages []llm.Message, assistantText string, toolCalls []llm.ToolCall, ...) []llm.Message
- func BuildContext(mem *Memory, history []ChatEntry, userMsg string) []llm.Message
- func GenerateTitle(sup *concurrency.Supervisor, parent context.Context, llmClient *llm.Client, ...)
- type Agent
- type AgentChunkMsg
- type AgentDoneMsg
- type AskUserMsg
- type AskUserReply
- type ChatEntry
- type DispatchResult
- type Memory
- type Session
- func (s *Session) AppendChat(role, content string, toolCalls interface{})
- func (s *Session) GetAgentMD() string
- func (s *Session) GetChatLog() []ChatEntry
- func (s *Session) GetMeta() SessionMeta
- func (s *Session) Save() error
- func (s *Session) SetTitle(title string)
- func (s *Session) Stop()
- func (s *Session) UpdateAgentMD(content string)
- type SessionIndex
- type SessionMeta
- type SessionSummary
- type SidebarRefreshMsg
- type StreamDispatcher
- type ToolDoneMsg
- type ToolStartMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToolRound ¶
func BuildContext ¶
func GenerateTitle ¶
func GenerateTitle( sup *concurrency.Supervisor, parent context.Context, llmClient *llm.Client, session *Session, firstUserMsg string, )
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) SetProgram ¶
func (*Agent) SubmitAskUserReply ¶
func (a *Agent) SubmitAskUserReply(reply AskUserReply)
type AgentChunkMsg ¶
type AgentChunkMsg struct{ Text string }
type AgentDoneMsg ¶
type AgentDoneMsg struct{ Err error }
type AskUserMsg ¶
type AskUserMsg struct {
Question string
Options []string
Fields []tools.AskUserField
}
type AskUserReply ¶
type DispatchResult ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
func (*Memory) AppendToSection ¶
func (*Memory) BuildSystemPrompt ¶
func (*Memory) GetSection ¶
func (*Memory) SetSection ¶
type Session ¶
type Session struct {
ID string
Dir string
Meta SessionMeta
// contains filtered or unexported fields
}
func (*Session) AppendChat ¶
func (*Session) GetAgentMD ¶
func (*Session) GetChatLog ¶
func (*Session) GetMeta ¶
func (s *Session) GetMeta() SessionMeta
func (*Session) UpdateAgentMD ¶
type SessionIndex ¶
type SessionIndex struct {
// contains filtered or unexported fields
}
func NewSessionIndex ¶
func NewSessionIndex(baseDir string) (*SessionIndex, error)
func (*SessionIndex) Delete ¶
func (i *SessionIndex) Delete(id string) error
func (*SessionIndex) List ¶
func (i *SessionIndex) List() []SessionSummary
func (*SessionIndex) Upsert ¶
func (i *SessionIndex) Upsert(s SessionSummary) error
type SessionMeta ¶
type SessionSummary ¶
type SidebarRefreshMsg ¶
type StreamDispatcher ¶
type StreamDispatcher struct {
// contains filtered or unexported fields
}
func NewStreamDispatcher ¶
func NewStreamDispatcher( onText func(string), onToolStart func(id, name string), onToolChunk func(id, chunk string), onToolEnd func(id string), ) *StreamDispatcher
func (*StreamDispatcher) Run ¶
func (d *StreamDispatcher) Run(ctx context.Context, deltaCh <-chan llm.Delta) DispatchResult
type ToolDoneMsg ¶
type ToolStartMsg ¶
Click to show internal directories.
Click to hide internal directories.