frames

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: BSD-2-Clause Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package frames holds the frames the Google services add to the pipeline's own: the search results and grounding a Gemini model reports when it answers from a web search.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LLMSearchOrigin

type LLMSearchOrigin struct {
	// SiteURI is the page's address, when known.
	SiteURI string
	// SiteTitle is the page's title, when known.
	SiteTitle string
	// Results are the parts of the answer the page supports.
	Results []LLMSearchResult
}

LLMSearchOrigin is a web page the answer drew on, with the parts of the answer it supports.

type LLMSearchResponseFrame

type LLMSearchResponseFrame struct {
	frames.BaseDataFrame
	// SearchResult is the text of the answer the search supports.
	SearchResult string
	// RenderedContent is the search suggestions from the search entry point,
	// rendered for display.
	RenderedContent string
	// Origins are the pages the answer drew on.
	Origins []LLMSearchOrigin
}

LLMSearchResponseFrame carries what a Gemini model reported about the web search it answered from: the answer's text, the rendered search suggestions, and the pages it drew on.

func NewLLMSearchResponseFrame

func NewLLMSearchResponseFrame(
	searchResult, renderedContent string, origins []LLMSearchOrigin,
) *LLMSearchResponseFrame

NewLLMSearchResponseFrame builds an LLMSearchResponseFrame.

func (*LLMSearchResponseFrame) String

func (f *LLMSearchResponseFrame) String() string

String implements fmt.Stringer.

type LLMSearchResult

type LLMSearchResult struct {
	// Text is the part of the answer the search supports.
	Text string
	// Confidence are the model's confidence scores for that support.
	Confidence []float64
}

LLMSearchResult is one piece of the answer a search supports, with the model's confidence in that support.

Jump to

Keyboard shortcuts

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