Class HuggingFaceModel
java.lang.Object
uno.anahata.asi.agi.provider.AbstractModel
uno.anahata.asi.openai.compatible.OpenAiCompatibleModel
uno.anahata.asi.huggingface.HuggingFaceModel
A model instance that carries additional metadata discovered from the Hugging Face Hub.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.fasterxml.jackson.databind.JsonNodeThe raw JSON from the model's 'generation_config.json', used to extract default sampling parameters like temperature and top-p.private com.fasterxml.jackson.databind.JsonNodeThe raw JSON from the model's 'config.json', containing architectural details and token limits.private booleanFlag derived from the chat template or config indicating if the model supports tool calling.private com.fasterxml.jackson.databind.JsonNodeThe raw JSON from the model's 'tokenizer_config.json', used to discover chat templates and tool support markers.Fields inherited from class AbstractModel
defaultTemperature, defaultTopK, defaultTopP, description, enabled, MARKUP_TABLE_HEADER, rawDescription, supportedActions, supportedResponseModalities, tokenizerType -
Constructor Summary
ConstructorsConstructorDescriptionHuggingFaceModel(HuggingFaceProvider provider, String modelId, String displayName) Constructs a new Hugging Face model instance. -
Method Summary
Modifier and TypeMethodDescriptionBuilds a rich HTML view combining architecture, tokenizer class, and deep-inspected sampling parameters.booleanChecks if this model supports native function calling (tools).Methods inherited from class OpenAiCompatibleModel
buildParametersNode, countTokens, countTokens, countTokens, countTokens, createModelMessage, createResponseWithEstimatedUsage, enrichPayload, generateContent, generateContentStream, getAvailableServerTools, getDefaultServerTools, getEndpoint, getToolDeclarationJson, isSupportsBatchEmbeddings, isSupportsCachedContent, isSupportsContentGeneration, isSupportsEmbeddings, preparePayloadMethods inherited from class AbstractModel
getModelId, getProviderId, getTokenizerType, hasDiscrepancy, isRegistered, matches, persist, remove, resetFromApi, toMarkupRow, toSafeModelFileName, toString
-
Field Details
-
hubConfig
private com.fasterxml.jackson.databind.JsonNode hubConfigThe raw JSON from the model's 'config.json', containing architectural details and token limits. -
tokenizerConfig
private com.fasterxml.jackson.databind.JsonNode tokenizerConfigThe raw JSON from the model's 'tokenizer_config.json', used to discover chat templates and tool support markers. -
generationConfig
private com.fasterxml.jackson.databind.JsonNode generationConfigThe raw JSON from the model's 'generation_config.json', used to extract default sampling parameters like temperature and top-p. -
supportsFunctionCalling
private boolean supportsFunctionCallingFlag derived from the chat template or config indicating if the model supports tool calling.
-
-
Constructor Details
-
HuggingFaceModel
Constructs a new Hugging Face model instance.- Parameters:
provider- The owning HF provider.modelId- The full repo ID.displayName- The display name.
-
-
Method Details
-
isSupportsFunctionCalling
public boolean isSupportsFunctionCalling()Checks if this model supports native function calling (tools).Implementation details: Returns the value discovered during the Hub inspection phase.
- Overrides:
isSupportsFunctionCallingin classOpenAiCompatibleModel- Returns:
- true if supported.
-
buildHubHtmlDescription
Builds a rich HTML view combining architecture, tokenizer class, and deep-inspected sampling parameters.- Returns:
- The formatted HTML summary string.
-

