Documentation
¶
Index ¶
- func BuildDecisionPrompt(agentName, role string, personality map[string]any, state map[string]any) string
- type Client
- func (c *Client) BaseURL() string
- func (c *Client) Decide(ctx context.Context, prompt string) (*DecisionResponse, error)
- func (c *Client) Generate(ctx context.Context, prompt string) (string, error)
- func (c *Client) HasPromptManager() bool
- func (c *Client) Model() string
- func (c *Client) RenderPrompt(promptType string, role string, ctx *prompts.TemplateContext) (string, error)
- func (c *Client) SetModel(model string)
- func (c *Client) TestConnection(ctx context.Context) error
- type Config
- type DecisionRequest
- type DecisionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles communication with Ollama
func (*Client) BaseURL ¶ added in v0.2.0
BaseURL returns the configured base URL for the LLM provider.
func (*Client) Generate ¶ added in v0.2.0
Generate sends a raw prompt to the LLM and returns the response text. Used by the Thought Engine for multi-call decision pipelines. Uses the /api/chat endpoint which handles thinking models (qwen3) properly.
func (*Client) HasPromptManager ¶
HasPromptManager returns whether the prompt manager is initialized
func (*Client) RenderPrompt ¶
func (c *Client) RenderPrompt(promptType string, role string, ctx *prompts.TemplateContext) (string, error)
RenderPrompt renders a prompt template with the given context. It first tries a role-specific template (e.g., "decision.craftsman") and falls back to the generic template (e.g., "decision") if not found.
type Config ¶
type Config struct {
BaseURL string
Model string
Timeout time.Duration
PromptsDir string
PromptsConfig string
}
Config holds LLM client configuration