utils

package
v0.0.0-...-cdc720d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCommandOutput

func FormatCommandOutput(output *commandline.CommandOutput) string

func FormatExecutedSteps

func FormatExecutedSteps(in []planexecute.ExecutedStep) string

func FormatInput

func FormatInput(input []adk.Message) string

func GetCurrentTime

func GetCurrentTime() string

func GetSessionValue

func GetSessionValue[T any](ctx context.Context, key string) (T, bool)

func NewChatModel

func NewChatModel(ctx context.Context, opts ...CreateChatModelOption) (cm model.ToolCallingChatModel, err error)

func NewPanicErr

func NewPanicErr(info any, stack []byte) error

NewPanicErr creates a new panic error. panicErr is a wrapper of panic info and stack trace. it implements the error interface, can print error message of info and stack trace.

func PtrOf

func PtrOf[T any](v T) *T

func RepairJSON

func RepairJSON(input string) string

func ToJSONString

func ToJSONString(v interface{}) string

Types

type CreateChatModelOption

type CreateChatModelOption func(o *option)

func WithDisableThinking

func WithDisableThinking(disable bool) CreateChatModelOption

func WithMaxTokens

func WithMaxTokens(maxTokens int) CreateChatModelOption

func WithTemperature

func WithTemperature(temp float32) CreateChatModelOption

func WithTopP

func WithTopP(topP float32) CreateChatModelOption

type TaskGroup

type TaskGroup interface {
	Go(f func() error)
	Wait() error
}

Jump to

Keyboard shortcuts

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