Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModelProvider ¶
type ModelProvider interface {
Generate(prompt string) (string, error)
ToolCall(prompt string) (string, error)
Stream(prompt string) (<-chan string, error)
}
ModelProvider defines the interface for AI generation in the real runtime.
type OpenAIProvider ¶
OpenAIProvider connects to the OpenAI API for completions.
func NewOpenAIProvider ¶
func NewOpenAIProvider(apiKey string) *OpenAIProvider
NewOpenAIProvider creates a new real OpenAI provider.
func (*OpenAIProvider) Generate ¶
func (p *OpenAIProvider) Generate(prompt string) (string, error)
Generate sends a prompt to OpenAI and gets a full text response.
Click to show internal directories.
Click to hide internal directories.