vllm

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package vllm implements the modelrepo.Provider contract against vLLM OpenAI-compatible HTTP endpoints. The package registers its catalog at init time; depend on it via blank import where the catalog must be discoverable from runtimestate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewVLLMChatClient

func NewVLLMChatClient(ctx context.Context, baseURL, modelName string, contextLength, maxOutputTokens int, httpClient *http.Client, apiKey string, canThink bool, tracker libtracker.ActivityTracker) (modelrepo.LLMChatClient, error)

func NewVLLMPromptClient

func NewVLLMPromptClient(ctx context.Context, baseURL, modelName string, contextLength, maxOutputTokens int, httpClient *http.Client, apiKey string, canThink bool, tracker libtracker.ActivityTracker) (modelrepo.LLMPromptExecClient, error)

NewVLLMPromptClient creates a new prompt client

func NewVLLMProvider

func NewVLLMProvider(modelName string, backends []string, client *http.Client, caps modelrepo.CapabilityConfig, authToken string, tracker libtracker.ActivityTracker) modelrepo.Provider

func NewVLLMStreamClient

func NewVLLMStreamClient(ctx context.Context, baseURL, modelName string, contextLength, maxOutputTokens int, httpClient *http.Client, apiKey string, canThink bool, tracker libtracker.ActivityTracker) (modelrepo.LLMStreamClient, error)

Types

type VLLMChatClient

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

func (*VLLMChatClient) Chat

func (*VLLMChatClient) Prompt

func (c *VLLMChatClient) Prompt(ctx context.Context, systemInstruction string, temperature float32, prompt string) (string, error)

Prompt implements LLMPromptExecClient interface

type VLLMStreamClient

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

func (*VLLMStreamClient) Prompt

func (c *VLLMStreamClient) Prompt(ctx context.Context, systemInstruction string, temperature float32, prompt string) (string, error)

Prompt implements LLMPromptExecClient interface

func (*VLLMStreamClient) Stream

func (c *VLLMStreamClient) Stream(ctx context.Context, messages []modelrepo.Message, args ...modelrepo.ChatArgument) (<-chan *modelrepo.StreamParcel, error)

Stream implements LLMStreamClient interface

Jump to

Keyboard shortcuts

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