Huggingface.js documentation
Giao diện: TextGenerationStreamToken
@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: TextGenerationStreamToken
Thuộc tính
id
• id: number
Token ID từ bộ phân từ của mô hình
Được định nghĩa trong
inference/src/tasks/nlp/textGenerationStream.ts:9
logprob
• logprob: number
Logprob
Được định nghĩa trong
inference/src/tasks/nlp/textGenerationStream.ts:13
special
• special: boolean
Token có phải là token đặc biệt không Có thể được sử dụng để bỏ qua các token khi nối
Được định nghĩa trong
inference/src/tasks/nlp/textGenerationStream.ts:18
text
• text: string
Văn bản token
Được định nghĩa trong
inference/src/tasks/nlp/textGenerationStream.ts:11
Update on GitHub