llm

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package llm contributes the GEMINI statement family (LLM-assisted query composition) to spanner-mycli through the Feature registration seam (issue #778). It is imported only by the full binary (via internal/mycli/feature/all); the core internal/mycli package does not import it, so google.golang.org/genai, github.com/apstndb/genaischema, github.com/apstndb/developerknowledge-go, and github.com/apstndb/spanner-docs-embed all stay off the core import path.

GEMINI is the first feature to use the Flags/KongVars/ApplyFlags seam: it contributes the --vertexai-project/model/location CLI flags (Feature.Flags), the default-model/location help-template values (Feature.KongVars), and routes the parsed values into the CLI_VERTEXAI_* system variables through the registry (Feature.ApplyFlags), never by direct assignment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Feature

func Feature() mycli.Feature

Feature returns the GEMINI Feature value. Each call allocates a FRESH config and a fresh flags struct, wiring fresh Variable/def/statement/ApplyFlags instances around them, so no state is shared between Feature values (#778 §4.4 session-isolation commitment).

Types

type DocResult

type DocResult struct {
	Name    string
	Content string
}

DocResult represents a fetched document with its name and content.

type DocSearchResult

type DocSearchResult struct {
	Name    string // Document identifier (e.g., "documents/docs.cloud.google.com/spanner/docs/...")
	Snippet string // Brief text snippet from the document
}

DocSearchResult represents a single search result chunk.

type GeminiStatement

type GeminiStatement struct {
	Text string
	// contains filtered or unexported fields
}

GeminiStatement composes a Cloud Spanner query from a natural-language prompt using Gemini. It implements no marker interfaces: like the pre-extraction in-core type, it is neither detached-compatible (blocked in detached session mode) nor READONLY-classified.

func (*GeminiStatement) Execute

func (s *GeminiStatement) Execute(ctx context.Context, session *mycli.Session) (*mycli.Result, error)

Jump to

Keyboard shortcuts

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