Documentation
¶
Index ¶
- func AskAI(ctx context.Context, p *props.Props, fsys fs.FS, question string, ...) (string, error)
- func GetAllMarkdownContent(fsys fs.FS) (string, error)
- func ResolveProvider(p *props.Props, providerOverride ...string) chat.Provider
- func Serve(ctx context.Context, fsys fs.FS, port int) error
- type AskFunc
- type AskLogMsg
- type AskResponse
- type AskResultMsg
- type ListItem
- type LogFinishedMsg
- type MkDocsConfig
- type Model
- type NavNode
- type Option
- type SearchResult
- type SearchResultMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskAI ¶
func AskAI(ctx context.Context, p *props.Props, fsys fs.FS, question string, logFn func(string, log.Level), providerOverride ...string) (string, error)
AskAI encapsulates the logic to query the AI about the documentation. logFn is optional, if provided it receives log output.
func GetAllMarkdownContent ¶
GetAllMarkdownContent walks the FS and concatenates all .md files.
func ResolveProvider ¶
ResolveProvider determines the AI provider to use based on override, config, and defaults.
Types ¶
type AskResponse ¶
type AskResponse struct {
Answer string `json:"answer" jsonschema:"description=The comprehensive answer to the user's question based on the documentation provided."`
}
type AskResultMsg ¶
type LogFinishedMsg ¶
type LogFinishedMsg struct{}
type MkDocsConfig ¶
type MkDocsConfig struct {
}
type SearchResult ¶
type SearchResultMessage ¶
type SearchResultMessage struct {
Results []SearchResult
Query string
}
Click to show internal directories.
Click to hide internal directories.