Documentation
¶
Index ¶
- type Chain
- func (c *Chain) AnalyzeEntity(ctx context.Context, entityName string) (string, error)
- func (c *Chain) Chat(ctx context.Context, conversation *ConversationContext, userMessage string) (string, error)
- func (c *Chain) GenerateDocs(ctx context.Context, entityName string) (string, error)
- func (c *Chain) GenerateProjectDocs(ctx context.Context, promptInstruction string, progressFn func(string)) (string, error)
- func (c *Chain) QueryNatural(ctx context.Context, query string) (string, error)
- func (c *Chain) ReviewCode(ctx context.Context, entityName string) (string, error)
- func (c *Chain) Summarize(ctx context.Context, filePath string) (string, error)
- type ChainType
- type ConversationContext
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain handles AI operations on code
func (*Chain) AnalyzeEntity ¶
AnalyzeEntity provides detailed analysis of a specific entity
func (*Chain) Chat ¶
func (c *Chain) Chat(ctx context.Context, conversation *ConversationContext, userMessage string) (string, error)
Chat enables multi-turn conversation about code
func (*Chain) GenerateDocs ¶
GenerateDocs generates documentation for an entity
func (*Chain) GenerateProjectDocs ¶
func (c *Chain) GenerateProjectDocs(ctx context.Context, promptInstruction string, progressFn func(string)) (string, error)
GenerateProjectDocs generates AI-assisted documentation for every file in the project. All entities of a file are batched into a single prompt so the number of API calls equals the number of indexed files.
promptInstruction shapes the documentation style and is used as the system message. When empty a default technical-writing instruction is used.
progressFn (optional) is called with each file path just before its API call so the caller can print progress.
func (*Chain) QueryNatural ¶
QueryNatural performs a natural language query on the code graph
func (*Chain) ReviewCode ¶
ReviewCode provides code review and suggestions