Huggingface.js 文档

接口:TextGenerationStreamToken

Hugging Face's logo
加入 Hugging Face 社区

并获得增强的文档体验

开始使用

接口:TextGenerationStreamToken

属性

id

id: number

来自模型 tokenizer 的 Token ID

定义在

inference/src/tasks/nlp/textGenerationStream.ts:7


logprob(对数概率)

logprob: number

对数概率

定义在

inference/src/tasks/nlp/textGenerationStream.ts:11


special(特殊)

special: boolean

Token 是否为特殊 token。可用于在连接时忽略 token

定义在

inference/src/tasks/nlp/textGenerationStream.ts:16


text(文本)

text: string

Token 文本

定义在

inference/src/tasks/nlp/textGenerationStream.ts:9

< > 在 GitHub 上更新