Documentation
¶
Index ¶
- Constants
- func ModelDir() string
- type Client
- type Manager
- func (m *Manager) GetLLMAddress(modelID string) (string, error)
- func (m *Manager) Initialize(ctx context.Context, apiReader client.Reader, namespace string) error
- func (m *Manager) ListInProgressModels() []string
- func (m *Manager) ListSyncedModelIDs(ctx context.Context) []string
- func (m *Manager) PullModel(ctx context.Context, modelID string) error
- func (m *Manager) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (m *Manager) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
View Source
const RuntimeNameOllama = "ollama"
RuntimeNameOllama is the name of the Ollama runtime.
View Source
const RuntimeNameVLLM = "vllm"
RuntimeNameVLLM is the name of the VLLM runtime.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface { GetAddress(name string) string DeployRuntime(ctx context.Context, modelID string) error }
Client is the interface for managing runtimes.
func NewOllamaClient ¶
func NewOllamaClient( k8sClient client.Client, namespace string, rconfig config.RuntimeConfig, oconfig config.OllamaConfig, ) Client
NewOllamaClient creates a new Ollama runtime client.
func NewVLLMClient ¶ added in v0.249.0
func NewVLLMClient( k8sClient client.Client, namespace string, rconfig config.RuntimeConfig, vconfig config.VLLMConfig, modelContextLengths map[string]int, ) Client
NewVLLMClient creates a new VLLM runtime client.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages runtimes.
func NewManager ¶
NewManager creates a new runtime manager.
func (*Manager) GetLLMAddress ¶
GetLLMAddress returns the address of the LLM.
func (*Manager) Initialize ¶
Initialize initializes ready and pending runtimes. This function is not thread-safe.
func (*Manager) ListInProgressModels ¶
ListInProgressModels returns the list of models that are in progress.
func (*Manager) ListSyncedModelIDs ¶
ListSyncedModelIDs returns the list of models that are synced.
Click to show internal directories.
Click to hide internal directories.