llmrepo

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 11 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 (
	EmbedPoolID   = "internal_embed_pool"
	EmbedPoolName = "Embedder"
)
View Source
const (
	TasksPoolID   = "internal_tasks_pool"
	TasksPoolName = "Tasks"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DatabaseURL string `json:"database_url"`
	EmbedModel  string `json:"embed_model"`
	TaskModel   string `json:"task_model"`
	TenantID    string `json:"tenant_id"`
}

type MockModelRepo

type MockModelRepo struct {
	Provider libmodelprovider.Provider
}

func (*MockModelRepo) GetAvailableProviders

func (m *MockModelRepo) GetAvailableProviders(ctx context.Context) ([]libmodelprovider.Provider, error)

func (*MockModelRepo) GetDefaultSystemProvider

func (m *MockModelRepo) GetDefaultSystemProvider(ctx context.Context) (libmodelprovider.Provider, error)

func (*MockModelRepo) GetRuntime

TODO: Implement GetRuntime method

func (*MockModelRepo) GetTokenizer

func (m *MockModelRepo) GetTokenizer(ctx context.Context, modelName string) (Tokenizer, error)

Fixed: Added modelName parameter to match interface

type ModelRepo

type ModelRepo interface {
	GetDefaultSystemProvider(ctx context.Context) (libmodelprovider.Provider, error)
	GetTokenizer(ctx context.Context, modelName string) (Tokenizer, error)
	GetRuntime(ctx context.Context) llmresolver.ProviderFromRuntimeState
	GetAvailableProviders(ctx context.Context) ([]libmodelprovider.Provider, error)
}

func NewEmbedder

func NewEmbedder(ctx context.Context, config *Config, dbInstance libdb.DBManager, runtime *runtimestate.State) (ModelRepo, error)

func NewExecRepo

func NewExecRepo(ctx context.Context, config *Config, dbInstance libdb.DBManager, runtime *runtimestate.State, tokenizer ollamatokenizer.Tokenizer) (ModelRepo, error)

type Tokenizer

type Tokenizer interface {
	Tokenize(ctx context.Context, prompt string) ([]int, error)
	CountTokens(ctx context.Context, prompt string) (int, error)
}

Jump to

Keyboard shortcuts

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