Documentation
¶
Index ¶
- func NewOllamaRuntime(cfg runtime.Config) (runtime.ModelRuntime, error)
- func NewRuntime(cfg runtime.Config) (runtime.ModelRuntime, error)
- func NewRuntimeWithRegistry(reg *Registry, cfg runtime.Config) (runtime.ModelRuntime, error)
- type Builder
- type OllamaRuntime
- func (r *OllamaRuntime) Chat(ctx context.Context, req runtime.ChatRequest) (*runtime.ChatResponse, error)
- func (r *OllamaRuntime) Engine() runtime.Engine
- func (r *OllamaRuntime) GenerateStructured(ctx context.Context, req runtime.StructuredRequest) (*runtime.StructuredResponse, error)
- func (r *OllamaRuntime) Health(ctx context.Context) (*runtime.HealthStatus, error)
- func (r *OllamaRuntime) Stream(context.Context, runtime.ChatRequest) (<-chan runtime.StreamEvent, error)
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOllamaRuntime ¶
func NewOllamaRuntime(cfg runtime.Config) (runtime.ModelRuntime, error)
func NewRuntime ¶
func NewRuntime(cfg runtime.Config) (runtime.ModelRuntime, error)
func NewRuntimeWithRegistry ¶
Types ¶
type OllamaRuntime ¶
type OllamaRuntime struct {
// contains filtered or unexported fields
}
func (*OllamaRuntime) Chat ¶
func (r *OllamaRuntime) Chat(ctx context.Context, req runtime.ChatRequest) (*runtime.ChatResponse, error)
func (*OllamaRuntime) Engine ¶
func (r *OllamaRuntime) Engine() runtime.Engine
func (*OllamaRuntime) GenerateStructured ¶
func (r *OllamaRuntime) GenerateStructured(ctx context.Context, req runtime.StructuredRequest) (*runtime.StructuredResponse, error)
func (*OllamaRuntime) Health ¶
func (r *OllamaRuntime) Health(ctx context.Context) (*runtime.HealthStatus, error)
func (*OllamaRuntime) Stream ¶
func (r *OllamaRuntime) Stream(context.Context, runtime.ChatRequest) (<-chan runtime.StreamEvent, error)
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewDefaultRegistry ¶
func NewDefaultRegistry() *Registry
func NewRegistry ¶
func NewRegistry() *Registry
Click to show internal directories.
Click to hide internal directories.