llmcostcel

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package llmcostcel provides functions to create and evaluate CEL programs to calculate costs.

This exists as a separate package to be used both in the controller to validate the expression and in the external processor to evaluate the expression.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvaluateProgram

func EvaluateProgram(prog cel.Program, modelName, backend string, inputTokens, outputTokens, totalTokens uint32) (uint64, error)

EvaluateProgram evaluates the given CEL program with the given variables.

func NewProgram

func NewProgram(expr string) (prog cel.Program, err error)

NewProgram creates a new CEL program from the given expression.

Types

This section is empty.

Jump to

Keyboard shortcuts

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