Huggingface.js documentation
Giao diện: SpaceRuntime
@huggingface/inference
Sử dụng Inference ClientTham khảo API
Các lớp
HfInferenceInferenceClientInferenceClientEndpointInferenceClientErrorInferenceClientHubApiErrorInferenceClientInputErrorInferenceClientProviderApiErrorInferenceClientProviderOutputErrorInferenceClientRoutingError
Giao diện
AudioToAudioOutputAudioToAudioOutputElemBaseArgsBodyParamsHeaderParamsInferenceProviderMappingEntryLoggerTùy chọnTextGenerationInputTextGenerationOutputTextGenerationStreamBestOfSequenceTextGenerationStreamDetailsTextGenerationStreamOutputTextGenerationStreamPrefillTokenTextGenerationStreamTokenUrlParams
Các module
@huggingface/hub
Tương tác với HubTham khảo API
Các lớp
Giao diện
AuthInfoCachedFileInfoCachedRepoInfoCachedRevisionInfoCommitCopyFileCommitDataCommitDeletedEntryCommitEditFileCommitEditFileParamsCommitFileCommitInfoCommitOutputCopyDestinationCopyFilesEntryCopyProgressEventCopySourceThông tin xác thựcDatasetEntryFileDownloadInfoOutputHFCacheInfoJobVolumeLfsPathInfoListFileEntryMlxQuantizationConfigModelConfigModelDerivedFieldsModelEntryOAuthResultParallelDownloadOptionsPathInfoQuantizationConfigRangeEditCacheEntryRepoIdSafetensorsIndexJsonSafetensorsShardFileInfoSecurityFileStatusSpaceEntrySpaceResourceConfigSpaceResourceRequirementSpaceRuntimeTensorInfoUserInfoWhoAmIAppWhoAmIOrgWhoAmIUserXetFileInfoXetReadToken
@huggingface/mcp-client
@huggingface/tiny-agents
@huggingface/space-header
@huggingface/gguf
@huggingface/lerobot
@huggingface/usd-web-viewer
Giao diện: SpaceRuntime
Thuộc tính
errorMessage
• Optional errorMessage: string
Được định nghĩa trong
packages/hub/src/types/public.ts:108
gcTimeout
• gcTimeout Optional: null | number
trong vài giây
Được định nghĩa trong
packages/hub/src/types/public.ts:118
phần cứng
• Phần cứng Optional: Object
Khai báo kiểu
| Tên | Loại |
|---|---|
current | null | SpaceHardwareFlavor |
currentPrettyName? | string |
requested | null | SpaceHardwareFlavor |
requestedPrettyName? | string |
Được định nghĩa trong
packages/hub/src/types/public.ts:109
tài nguyên
• resources Optional: SpaceResourceConfig
khi gọi /spaces, các thuộc tính đó chỉ được lấy nếu ?full=true
Được định nghĩa trong
packages/hub/src/types/public.ts:116
sdk
• sdk Optional: SpaceSdk
Được định nghĩa trong
packages/hub/src/types/public.ts:106
sdkVersion
• Optional sdkVersion: string
Được định nghĩa trong
packages/hub/src/types/public.ts:107
giai đoạn
• stage: SpaceStage
Được định nghĩa trong
packages/hub/src/types/public.ts:105
Update on GitHub