scriptedtest

package
v1.0.0-rc.15 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 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

Index

Constants

View Source
const (
	DefaultModelName = "scripted-test"
)

Variables

This section is empty.

Functions

func ResolvePath

func ResolvePath(baseURL string) (string, error)

Types

type Capabilities

type Capabilities struct {
	Chat   *bool `json:"chat,omitempty"`
	Stream *bool `json:"stream,omitempty"`
	Prompt *bool `json:"prompt,omitempty"`
	Embed  *bool `json:"embed,omitempty"`
	Think  *bool `json:"think,omitempty"`
	Vision *bool `json:"vision,omitempty"`
	Audio  *bool `json:"audio,omitempty"`
}

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(modelName, scriptPath string, caps modelrepo.CapabilityConfig, embedDimensions int, tracker libtracker.ActivityTracker) *Provider

func (*Provider) CanAudio

func (p *Provider) CanAudio() bool

func (*Provider) CanAutocomplete

func (p *Provider) CanAutocomplete() bool

func (*Provider) CanChat

func (p *Provider) CanChat() bool

func (*Provider) CanEmbed

func (p *Provider) CanEmbed() bool

func (*Provider) CanNextEdit

func (p *Provider) CanNextEdit() bool

func (*Provider) CanPrompt

func (p *Provider) CanPrompt() bool

func (*Provider) CanStream

func (p *Provider) CanStream() bool

func (*Provider) CanThink

func (p *Provider) CanThink() bool

func (*Provider) CanVision

func (p *Provider) CanVision() bool

func (*Provider) GetAutocompleteConnection

func (p *Provider) GetAutocompleteConnection(context.Context, string) (modelrepo.LLMAutocompleteClient, error)

func (*Provider) GetBackendIDs

func (p *Provider) GetBackendIDs() []string

func (*Provider) GetChatConnection

func (p *Provider) GetChatConnection(ctx context.Context, backendID string) (modelrepo.LLMChatClient, error)

func (*Provider) GetContextLength

func (p *Provider) GetContextLength() int

func (*Provider) GetEmbedConnection

func (p *Provider) GetEmbedConnection(ctx context.Context, backendID string) (modelrepo.LLMEmbedClient, error)

func (*Provider) GetID

func (p *Provider) GetID() string

func (*Provider) GetMaxOutputTokens

func (p *Provider) GetMaxOutputTokens() int

func (*Provider) GetNextEditConnection

func (p *Provider) GetNextEditConnection(context.Context, string) (modelrepo.LLMNextEditClient, error)

func (*Provider) GetPromptConnection

func (p *Provider) GetPromptConnection(ctx context.Context, backendID string) (modelrepo.LLMPromptExecClient, error)

func (*Provider) GetStreamConnection

func (p *Provider) GetStreamConnection(ctx context.Context, backendID string) (modelrepo.LLMStreamClient, error)

func (*Provider) GetType

func (p *Provider) GetType() string

func (*Provider) ModelName

func (p *Provider) ModelName() string

type Script

type Script struct {
	Path            string
	Model           string
	ContextLength   int
	MaxOutputTokens int
	EmbedDimensions int
	Capabilities    Capabilities
	Turns           []Turn
	// contains filtered or unexported fields
}

func Load

func Load(path string) (*Script, error)

func Parse

func Parse(path string, raw []byte) (*Script, error)

func (*Script) Next

func (s *Script) Next(operation string) (Turn, int, error)

func (*Script) Position

func (s *Script) Position() int

type ToolCall

type ToolCall struct {
	ID        string          `json:"id,omitempty"`
	Name      string          `json:"name"`
	Arguments json.RawMessage `json:"arguments,omitempty"`
}

type Turn

type Turn struct {
	Text         string     `json:"text,omitempty"`
	Thinking     string     `json:"thinking,omitempty"`
	ToolCalls    []ToolCall `json:"tool_calls,omitempty"`
	FinishReason string     `json:"finish_reason,omitempty"`
	Usage        *Usage     `json:"usage,omitempty"`
}

type Usage

type Usage struct {
	PromptTokens     int `json:"prompt_tokens,omitempty"`
	CompletionTokens int `json:"completion_tokens,omitempty"`
	TotalTokens      int `json:"total_tokens,omitempty"`
}

Jump to

Keyboard shortcuts

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