llm

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents an LLM client

func New

func New(config Config) *Client

New creates a new LLM client instance

func (*Client) Generate

func (c *Client) Generate(req GenerateRequest) <-chan GenerateResponse

Generate sends a prompt to the LLM and returns the response

type Config

type Config struct {
	Provider     string
	Model        string
	APIKey       string
	SystemPrompt string
}

Config holds the LLM configuration

type GenerateRequest

type GenerateRequest struct {
	SystemPrompt string
	Context      string
	Task         string
	Stream       bool // Enable streaming output to stdout
}

GenerateRequest represents a request to the LLM

type GenerateResponse

type GenerateResponse struct {
	Content string
	Error   error
}

GenerateResponse represents the response from the LLM

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL