Documentation
¶
Index ¶
- Constants
- Variables
- type DataType
- type ImageUrl
- type JSONSchema
- type ReasoningEffort
- type ServiceTier
- type StreamOptions
- type VLLM
- func (g *VLLM) Embed(request *embed.Request) (*embed.Response, error)
- func (g *VLLM) EmbedDocument(request *embed.DocumentRequest) (*embed.DocumentResponse, error)
- func (g *VLLM) Generator(options ...gen.Option) *gen.Generator
- func (g *VLLM) Provider() string
- func (g *VLLM) SetLogger(logger *slog.Logger) *VLLM
Constants ¶
View Source
const Provider = "vLLM"
Variables ¶
View Source
var EmbedModel_qwen_3_4b = embed.Model{ Provider: Provider, Name: "Qwen/Qwen3-Embedding-4B", InputMaxTokens: 32_768, OutputDimensions: 2560, }
View Source
var EmbedModel_qwen_3_8b = embed.Model{ Provider: Provider, Name: "Qwen/Qwen3-Embedding-8B", InputMaxTokens: 32_768, OutputDimensions: 4096, }
View Source
var GenModel_gpt_oss_20b = gen.Model{ Provider: Provider, Name: "openai/gpt-oss-20b", }
Functions ¶
This section is empty.
Types ¶
type ImageUrl ¶
type ImageUrl struct {
Url string `json:"url"` /// data:image/jpeg;base64,......
// contains filtered or unexported fields
}
func (ImageUrl) MarshalJSON ¶
type JSONSchema ¶
type JSONSchema struct {
Ref string `json:"$ref,omitempty"` // #/$defs/... etc, overrides everything else
Defs map[string]*JSONSchema `json:"$defs,omitempty"` // for $ref
// Type specifies the data type of the schema. VLLM uses []string{Type, Null} to represent nullable types.
Type any `json:"type,omitempty"`
// Description is the description of the schema.
Description string `json:"description,omitempty"`
// Enum is used to restrict a value to a fixed set of values. It must be an array with at least
// one element, where each element is unique. You will probably only use this with strings.
Enum []any `json:"enum,omitempty"`
Pattern string `json:"pattern,omitempty"` // Regular expression that the string must match.
Format string `json:"format,omitempty"` // Format of the data, e.g. "email", "date-time", etc.
// Properties describes the properties of an object, if the schema type is Object.
Properties *map[string]JSONSchema `json:"properties,omitempty"`
// Required specifies which properties are required, if the schema type is Object.
Required []string `json:"required,omitempty"`
// Items specifies which data type an array contains, if the schema type is Array.
Items *JSONSchema `json:"items,omitempty"`
// AdditionalProperties is used to control the handling of properties in an object
// that are not explicitly defined in the properties section of the schema. example:
// additionalProperties: true
// additionalProperties: false
// additionalProperties: jsonschema.JSONSchema{Type: jsonschema.String}
AdditionalProperties any `json:"additionalProperties,omitempty"`
MinLength int `json:"minLength,omitempty"` // Minimum length of the string.
MaxLength int `json:"maxLength,omitempty"` // Maximum length of the string.
Minimum float64 `json:"minimum,omitempty"` // Minimum value of the integer and number types.
Maximum float64 `json:"maximum,omitempty"` // Minimum value of the integer and number types.
MinItems int `json:"minItems,omitempty"` // Minimum number of items in an array.
MaxItems int `json:"maxItems,omitempty"` // Maximum number of items in an array.
}
func (JSONSchema) IsObjectRequired ¶
func (s JSONSchema) IsObjectRequired() bool
type ReasoningEffort ¶
type ReasoningEffort string
ReasoningEffort is a string that can be "low", "medium", or "high".
const ( ReasoningEffortNone ReasoningEffort = "low" ReasoningEffortLow ReasoningEffort = "low" ReasoningEffortMedium ReasoningEffort = "medium" ReasoningEffortHigh ReasoningEffort = "high" )
type ServiceTier ¶
type ServiceTier string
const ( ServiceTierAuto ServiceTier = "auto" ServiceTierDefault ServiceTier = "default" ServiceTierFlex ServiceTier = "flex" ServiceTierPriority ServiceTier = "priority" )
type StreamOptions ¶
type StreamOptions struct {
IncludeUsage bool `json:"include_usage"`
}
type VLLM ¶
func (*VLLM) EmbedDocument ¶
func (g *VLLM) EmbedDocument(request *embed.DocumentRequest) (*embed.DocumentResponse, error)
Click to show internal directories.
Click to hide internal directories.