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 PromptOpenAI(systemPrompt, userPrompt, jsonSchema, apiKey string) (string, error)
- type ConversationalAgent
- 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 PromptOpenAI ¶ added in v0.2.1
PromptOpenAI is a convenience function for OpenAI prompts
Types ¶
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 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
Files []internal.File // Optional file attachments
}
PromptOptions configures the prompt request
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
llmkit
command
|
|
|
llmkit-anthropic
command
|
|
|
llmkit-google
command
|
|
|
llmkit-openai
command
|
|
|
examples
|
|
|
anthropic/agents/chat_example
command
|
|
|
anthropic/agents/coder
command
|
|
|
anthropic/agents/memory_demo
command
|
|
|
anthropic/agents/weather_agent
command
|
|
|
anthropic/files
command
|
|
|
google/files
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.