Huggingface.js documentation
Namespace: js
Namespace: js
snippets.js
Variables
jsSnippets
• Const
jsSnippets: Partial
\<Record
\<PipelineType
, (model
: ModelDataMinimal
, accessToken
: string
, provider
: SnippetInferenceProvider
, providerModelId?
: string
, opts?
: Record
\<string
, unknown
>) => InferenceSnippet
[]>>
Defined in
inference/src/snippets/js.ts:426
Functions
getJsInferenceSnippet
▸ getJsInferenceSnippet(model
, accessToken
, provider
, providerModelId?
, opts?
): InferenceSnippet
[]
Parameters
Name | Type |
---|---|
model | ModelDataMinimal |
accessToken | string |
provider | string |
providerModelId? | string |
opts? | Record \<string , unknown > |
Returns
InferenceSnippet
[]
Defined in
inference/src/snippets/js.ts:465
snippetAutomaticSpeechRecognition
▸ snippetAutomaticSpeechRecognition(model
, accessToken
, provider
): InferenceSnippet
[]
Parameters
Name | Type |
---|---|
model | ModelDataMinimal |
accessToken | string |
provider | string |
Returns
InferenceSnippet
[]
Defined in
inference/src/snippets/js.ts:363
snippetBasic
▸ snippetBasic(model
, accessToken
, provider
): InferenceSnippet
[]
Parameters
Name | Type |
---|---|
model | ModelDataMinimal |
accessToken | string |
provider | string |
Returns
InferenceSnippet
[]
Defined in
inference/src/snippets/js.ts:26
snippetFile
▸ snippetFile(model
, accessToken
, provider
): InferenceSnippet
[]
Parameters
Name | Type |
---|---|
model | ModelDataMinimal |
accessToken | string |
provider | string |
Returns
InferenceSnippet
[]
Defined in
inference/src/snippets/js.ts:391
snippetTextGeneration
▸ snippetTextGeneration(model
, accessToken
, provider
, providerModelId?
, opts?
): InferenceSnippet
[]
Parameters
Name | Type |
---|---|
model | ModelDataMinimal |
accessToken | string |
provider | string |
providerModelId? | string |
opts? | Object |
opts.max_tokens? | unknown |
opts.messages? | ChatCompletionInputMessage [] |
opts.streaming? | boolean |
opts.temperature? | number |
opts.top_p? | number |
Returns
InferenceSnippet
[]
Defined in
inference/src/snippets/js.ts:78
snippetTextToAudio
▸ snippetTextToAudio(model
, accessToken
, provider
): InferenceSnippet
[]
Parameters
Name | Type |
---|---|
model | ModelDataMinimal |
accessToken | string |
provider | string |
Returns
InferenceSnippet
[]
Defined in
inference/src/snippets/js.ts:309
snippetTextToImage
▸ snippetTextToImage(model
, accessToken
, provider
): InferenceSnippet
[]
Parameters
Name | Type |
---|---|
model | ModelDataMinimal |
accessToken | string |
provider | string |
Returns
InferenceSnippet
[]
Defined in
inference/src/snippets/js.ts:232
snippetTextToVideo
▸ snippetTextToVideo(model
, accessToken
, provider
): InferenceSnippet
[]
Parameters
Name | Type |
---|---|
model | ModelDataMinimal |
accessToken | string |
provider | string |
Returns
InferenceSnippet
[]
Defined in
inference/src/snippets/js.ts:282
snippetZeroShotClassification
▸ snippetZeroShotClassification(model
, accessToken
): InferenceSnippet
[]
Parameters
Name | Type |
---|---|
model | ModelDataMinimal |
accessToken | string |
Returns
InferenceSnippet
[]
Defined in
inference/src/snippets/js.ts:203
< > Update on GitHub