Documentation
¶
Index ¶
- func Prompt(opts PromptOptions) (string, error)
- func PromptAnthropic(systemPrompt, userPrompt, jsonSchema, apiKey string) (string, error)
- func PromptGoogle(systemPrompt, userPrompt, jsonSchema, apiKey string) (string, error)
- func PromptGrok(systemPrompt, userPrompt, jsonSchema, apiKey string) (string, error)
- func PromptOpenAI(systemPrompt, userPrompt, jsonSchema, apiKey string) (string, error)
- type Client
- type ConversationalAgent
- type MockClient
- type PromptOptions
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Prompt ¶ added in v0.2.1
func Prompt(opts PromptOptions) (string, error)
Prompt sends a prompt request to the specified LLM provider
func PromptAnthropic ¶ added in v0.2.1
PromptAnthropic is a convenience function for Anthropic prompts
func PromptGoogle ¶ added in v0.2.1
PromptGoogle is a convenience function for Google prompts
func PromptGrok ¶ added in v0.2.14
PromptGrok is a convenience function for Grok prompts
func PromptOpenAI ¶ added in v0.2.1
PromptOpenAI is a convenience function for OpenAI prompts
Types ¶
type Client ¶ added in v0.2.11
type Client interface {
Prompt(ctx context.Context, opts PromptOptions) (string, error)
}
Client interface enables mocking and testing
type ConversationalAgent ¶ added in v0.2.5
type ConversationalAgent interface {
Chat(message string, opts ...interface{}) (interface{}, error)
RegisterTool(tool interface{}) error
Reset(clearMemory bool) error
Remember(key, value string) error
Recall(key string) (string, bool)
}
ConversationalAgent represents a conversational agent
type MockClient ¶ added in v0.2.11
type MockClient struct {
PromptFunc func(ctx context.Context, opts PromptOptions) (string, error)
}
MockClient implements Client interface for testing
func NewMockClient ¶ added in v0.2.11
func NewMockClient() *MockClient
NewMockClient creates a new mock client with default behavior
func (*MockClient) Prompt ¶ added in v0.2.11
func (m *MockClient) Prompt(ctx context.Context, opts PromptOptions) (string, error)
Prompt delegates to the mock function
type PromptOptions ¶ added in v0.2.1
type PromptOptions struct {
Provider Provider // Which LLM provider to use
SystemPrompt string // System prompt for the request
UserPrompt string // User prompt for the request
JSONSchema string // Optional JSON schema for structured output
APIKey string // API key for the provider
MaxTokens int // Maximum tokens in response (0 = omit from request)
Temperature float64 // Sampling temperature (0 = omit from request)
Files []internal.File // Optional file attachments
}
PromptOptions configures the prompt request
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
llmkit
command
|
|
|
llmkit-anthropic
command
|
|
|
llmkit-google
command
|
|
|
llmkit-grok
command
|
|
|
llmkit-openai
command
|
|
|
tools
command
|
|
|
examples
|
|
|
anthropic/agents/chat_example
command
|
|
|
anthropic/agents/coder
command
|
|
|
anthropic/agents/memory_demo
command
|
|
|
anthropic/agents/weather_agent
command
|
|
|
anthropic/chat_with_files
command
|
|
|
anthropic/files
command
|
|
|
google/agents/weather_agent
command
|
|
|
google/files
command
|
|
|
google/proofs
command
|
|
|
grok/chat
command
|
|
|
grok/prompt
command
|
|
|
grok/weather
command
|
|
|
openai/agents/chat_example
command
|
|
|
openai/agents/memory_demo
command
|
|
|
openai/agents/temperature_test
command
|
|
|
openai/agents/weather_agent
command
|
|
|
openai/files
command
|
|
|
openai/speech_to_text
command
|
|
|
openai/text_to_speech
command
|
|
|
workflows/simple_workflow
command
Example program demonstrating the workflow package
|
Example program demonstrating the workflow package |
|
Package workflow provides a minimal API for creating and executing workflows consisting of tasks with conditional transitions.
|
Package workflow provides a minimal API for creating and executing workflows consisting of tasks with conditional transitions. |
Click to show internal directories.
Click to hide internal directories.