assistant

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package assistant provides a wrapper for the Google Generative AI (Gemini) SDK. It is designed to act as an "Option Analyzer," processing user prompts and returning structured results interpreted through an embedded Lua execution engine.

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 the LLM service provider and its internal state for chat sessions.

func NewClient

func NewClient(apiKey string, modelName string, allowedImageDomains string) (*Client, error)

NewClient initializes a new LLM client with a predefined system prompt and conversation history.

func (*Client) GenerateResponse

func (c *Client) GenerateResponse(ctx context.Context, newMessage *structs.PromptMessage, historyMessages []*structs.PromptMessage) (string, error)

GenerateResponse sends a message (and optional images) to the LLM and processes the Lua-formatted output.

Jump to

Keyboard shortcuts

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