Documentation
¶
Overview ¶
Package argus provides a static LLM model metadata registry for Go applications.
The registry is compiled into the package, so runtime lookup does not require network I/O. Applications can resolve model IDs and aliases, inspect provider metadata, render model cards, filter by capabilities such as image input or tool use, and search across model names, tags, summaries, and aliases.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeTag ¶
NormalizeTag maps an arbitrary tag-like string to a canonical taxonomy tag.
Types ¶
type Capability ¶
type Capability uint64
Capability represents a model's features or modalities using bitmasks.
const ( // Modalities (0-15 bit) ModalityTextIn Capability = 1 << iota ModalityTextOut ModalityImageIn ModalityImageOut ModalityAudioIn ModalityAudioOut ModalityVideoIn ModalityVideoOut ModalityFileIn ModalityFileOut )
const ( // Features (16-31 bit) CapFunctionCall Capability = 1 << (16 + iota) CapJsonMode CapSystemPrompt // Types (32-47 bit) CapChat Capability = 1 << (32 + iota) CapEmbedding CapRerank CapTTS CapASR CapMultimodal )
func (Capability) Has ¶
func (c Capability) Has(other Capability) bool
Has checks if the capability set contains the given capability.
func (Capability) String ¶
func (c Capability) String() string
String 实现 fmt.Stringer 接口 这样在 fmt.Printf("%v", cap) 时会自动调用
type Model ¶
type Model interface {
ID() string
Name() string
Provider() string
Description() string
DescriptionCN() string
Family() string
Series() string
Summary() string
Tags() []string
ContextLength() int
MaxOutput() int
HasCapability(c Capability) bool
Features() Capability
Aliases() []string
HasTag(tag string) bool
Card() ModelCard
}
Model is an interface for reading model metadata.
func Get ¶
Get retrieves a model by its ID or alias.
Example ¶
// Get a model by alias
if m, ok := argus.Get("gpt4t"); ok {
fmt.Printf("Model ID: %s\n", m.ID())
fmt.Printf("Provider: %s\n", m.Provider())
}
Output: Model ID: openai/gpt-4-turbo Provider: OpenAI
type ModelCard ¶
type ModelCard struct {
ID string
Name string
Provider string
Developer string
OfficialURL string
ModelCardURL string
Family string
Series string
Summary string
Tags []string
ContextLength int
MaxOutput int
Features Capability
Aliases []string
}
ModelCard contains the minimum structured metadata needed to render a model card quickly.
type QueryBuilder ¶
type QueryBuilder struct {
// contains filtered or unexported fields
}
QueryBuilder provides a chainable API for filtering models.
func (*QueryBuilder) Family ¶
func (q *QueryBuilder) Family(f string) *QueryBuilder
Family filters models by structured family name.
func (*QueryBuilder) Has ¶
func (q *QueryBuilder) Has(cap Capability) *QueryBuilder
Has filters models by capability.
func (*QueryBuilder) List ¶
func (q *QueryBuilder) List() []Model
List returns a slice of models matching the query criteria.
Example ¶
// Query models with Image support from Anthropic
models := argus.Query().
Provider("Anthropic").
Has(argus.ModalityImageIn).
List()
for _, m := range models {
fmt.Println(m.ID())
}
// (Output depends on registry content)
func (*QueryBuilder) Provider ¶
func (q *QueryBuilder) Provider(p string) *QueryBuilder
Provider filters models by provider name.
func (*QueryBuilder) Tag ¶
func (q *QueryBuilder) Tag(tag string) *QueryBuilder
Tag filters models by structured tag.
type Tag ¶
type Tag string
Tag is a stable canonical label that can be used by downstream projects to render model badges.
const ( TagChat Tag = "chat" TagEmbedding Tag = "embedding" TagRerank Tag = "rerank" TagTTS Tag = "tts" TagASR Tag = "asr" TagToolUse Tag = "tool-use" TagStructuredOutput Tag = "structured-output" TagMultimodal Tag = "multimodal" TagVision Tag = "vision" TagImageGeneration Tag = "image-generation" TagAudioInput Tag = "audio-input" TagAudioOutput Tag = "audio-output" TagVideoInput Tag = "video-input" TagFileInput Tag = "file-input" TagCoding Tag = "coding" TagReasoning Tag = "reasoning" TagAgent Tag = "agent" TagSearch Tag = "search" TagPreview Tag = "preview" TagExperimental Tag = "experimental" TagFast Tag = "fast" TagMini Tag = "mini" TagNano Tag = "nano" TagTurbo Tag = "turbo" TagPro Tag = "pro" TagFree Tag = "free" TagThinking Tag = "thinking" )
type TagDescriptor ¶
func KnownTags ¶
func KnownTags() []TagDescriptor
KnownTags returns the stable tag catalog that downstream projects can use for rendering and grouping.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
cardextractor
command
|
|
|
catalogdoctor
command
|
|
|
catalogsync
command
catalogsync audits publisher attribution and discovers new repositories from explicitly subscribed official Hugging Face organizations.
|
catalogsync audits publisher attribution and discovers new repositories from explicitly subscribed official Hugging Face organizations. |
|
codexcheck
command
|
|
|
codexgen
command
|
|
|
codexsuggest
command
|
|
|
enricher
command
|
|
|
generator
command
|
|
|
officialsync
command
officialsync corroborates model identity from first-party model-list APIs.
|
officialsync corroborates model identity from first-party model-list APIs. |
|
releasecheck
command
|
|
|
sitegen
command
|
|
|
suggestionctl
command
|
|
|
translator
command
|
|
|
examples
|
|
|
basic
command
|
|
|
internal
|
|
|
identity
Package identity resolves where a model's canonical identity comes from and whether a first-party source corroborates it.
|
Package identity resolves where a model's canonical identity comes from and whether a first-party source corroborates it. |