Class: HuggingFaceInferenceAPI
Wrapper on the Hugging Face's Inference API. API Docs: https://huggingface.co/docs/huggingface.js/inference/README List of tasks with models: huggingface.co/api/tasks
Note that Conversational API is not yet supported by the Inference API. They recommend using the text generation API instead. See: https://github.com/huggingface/huggingface.js/issues/586#issuecomment-2024059308
Extends
BaseLLM
Constructors
new HuggingFaceInferenceAPI()
new HuggingFaceInferenceAPI(
init
):HuggingFaceInferenceAPI
Parameters
• init: HFConfig
Returns
Overrides
BaseLLM.constructor
Source
packages/core/src/llm/huggingface.ts:53
Properties
contextWindow
contextWindow:
number
Source
packages/core/src/llm/huggingface.ts:50
hf
hf:
HfInference
Source
packages/core/src/llm/huggingface.ts:51
maxTokens?
optional
maxTokens:number
Source
packages/core/src/llm/huggingface.ts:49
model
model:
string
Source
packages/core/src/llm/huggingface.ts:46
temperature
temperature:
number
Source
packages/core/src/llm/huggingface.ts:47