Documentation
¶
Index ¶
- type InferenceMetrics
- type Pool
- func (p *Pool) Add(address string)
- func (p *Pool) CheckConnection(ctx context.Context) (bool, error)
- func (p *Pool) GetGpuInfo(ctx context.Context, address string) *llmrunnerpb.GetGpuInfoResponse
- func (p *Pool) GetModels(ctx context.Context) ([]string, error)
- func (p *Pool) GetRunners(ctx context.Context) []RunnerInfo
- func (p *Pool) GetServerInfo(ctx context.Context, address string) *llmrunnerpb.ServerInfo
- func (p *Pool) HasActiveRunners() bool
- func (p *Pool) Remove(address string)
- func (p *Pool) SendMessage(ctx context.Context, model string, messages []*domain.AIChatMessage, ...) (chan domain.TextStreamChunk, error)
- func (p *Pool) SetRunnerEnabled(address string, enabled bool)
- type RunnerInfo
- type Server
- func (s *Server) Embed(ctx context.Context, req *llmrunnerpb.EmbedRequest) (*llmrunnerpb.EmbedResponse, error)
- func (s *Server) EmbedBatch(ctx context.Context, req *llmrunnerpb.EmbedBatchRequest) (*llmrunnerpb.EmbedBatchResponse, error)
- func (s *Server) GetGpuInfo(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.GetGpuInfoResponse, error)
- func (s *Server) GetLoadedModel(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.GetLoadedModelResponse, error)
- func (s *Server) GetModels(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.GetModelsResponse, error)
- func (s *Server) GetServerInfo(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.ServerInfo, error)
- func (s *Server) LoadModel(ctx context.Context, req *llmrunnerpb.LoadModelRequest) (*llmrunnerpb.Empty, error)
- func (s *Server) ResetMemory(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.Empty, error)
- func (s *Server) RunnerProbe(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.RunnerProbeResponse, error)
- func (s *Server) SendMessage(req *llmrunnerpb.SendMessageRequest, ...) error
- func (s *Server) UnloadModel(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.Empty, error)
- type SysInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InferenceMetrics ¶
type InferenceMetrics struct {
// contains filtered or unexported fields
}
func NewInferenceMetrics ¶
func NewInferenceMetrics() *InferenceMetrics
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) GetGpuInfo ¶
func (p *Pool) GetGpuInfo(ctx context.Context, address string) *llmrunnerpb.GetGpuInfoResponse
func (*Pool) GetRunners ¶
func (p *Pool) GetRunners(ctx context.Context) []RunnerInfo
func (*Pool) GetServerInfo ¶
func (p *Pool) GetServerInfo(ctx context.Context, address string) *llmrunnerpb.ServerInfo
func (*Pool) HasActiveRunners ¶
func (*Pool) SendMessage ¶
func (p *Pool) SendMessage(ctx context.Context, model string, messages []*domain.AIChatMessage, stopSequences []string, timeoutSeconds int32, genParams *domain.GenerationParams, renderedPrompt string) (chan domain.TextStreamChunk, error)
func (*Pool) SetRunnerEnabled ¶
type RunnerInfo ¶
type Server ¶
type Server struct {
llmrunnerpb.UnimplementedLLMRunnerServiceServer
// contains filtered or unexported fields
}
func (*Server) Embed ¶
func (s *Server) Embed(ctx context.Context, req *llmrunnerpb.EmbedRequest) (*llmrunnerpb.EmbedResponse, error)
func (*Server) EmbedBatch ¶
func (s *Server) EmbedBatch(ctx context.Context, req *llmrunnerpb.EmbedBatchRequest) (*llmrunnerpb.EmbedBatchResponse, error)
func (*Server) GetGpuInfo ¶
func (s *Server) GetGpuInfo(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.GetGpuInfoResponse, error)
func (*Server) GetLoadedModel ¶
func (s *Server) GetLoadedModel(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.GetLoadedModelResponse, error)
func (*Server) GetModels ¶
func (s *Server) GetModels(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.GetModelsResponse, error)
func (*Server) GetServerInfo ¶
func (s *Server) GetServerInfo(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.ServerInfo, error)
func (*Server) LoadModel ¶
func (s *Server) LoadModel(ctx context.Context, req *llmrunnerpb.LoadModelRequest) (*llmrunnerpb.Empty, error)
func (*Server) ResetMemory ¶
func (s *Server) ResetMemory(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.Empty, error)
ResetMemory полностью выгружает текущую модель и освобождает VRAM/RAM процесса (тот же эффект, что UnloadModel).
func (*Server) RunnerProbe ¶
func (s *Server) RunnerProbe(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.RunnerProbeResponse, error)
func (*Server) SendMessage ¶
func (s *Server) SendMessage(req *llmrunnerpb.SendMessageRequest, stream llmrunnerpb.LLMRunnerService_SendMessageServer) error
func (*Server) UnloadModel ¶
func (s *Server) UnloadModel(ctx context.Context, _ *llmrunnerpb.Empty) (*llmrunnerpb.Empty, error)
Click to show internal directories.
Click to hide internal directories.