ai

package
v0.0.0-...-0ab5f93 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteTool

func ExecuteTool(ctx context.Context, name string, args map[string]interface{}) (interface{}, error)

func GetKairoTools

func GetKairoTools() *genai.Tool

func SetService

func SetService(svc service.TaskService)

Types

type AppContext

type AppContext struct {
	ViewName string
	Data     string
}

type Client

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

func NewClient

func NewClient(ctx context.Context, apiKey string, modelName string) (*Client, error)

func (*Client) ChatStream

func (c *Client) ChatStream(ctx context.Context, history []*genai.Content, userMsg string, appCtx AppContext) (<-chan StreamChunk, error)

type StreamChunk

type StreamChunk struct {
	Text    string
	Done    bool
	Err     error
	ToolUse *ToolUseEvent
	Refresh bool             // Signals the UI to reload data live
	History []*genai.Content // Updated history to persist context
}

type ToolUseEvent

type ToolUseEvent struct {
	ToolName string
	Args     map[string]interface{}
}

Jump to

Keyboard shortcuts

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