Skip to content

Additional Parameters in the HuggingFace model.

This is completely exclusive to the HuggingFace model.

When initializing your HuggingFace model you can add additional parameters.

NOTE

The additional parameters (params) is a {} type, meaning you can only use braces for this constructor parameter. The additional parameters (params) is an optional constructor parameter.

The default value of the additional parameters is

ts
{ max_new_tokens: 50 }

You can customize this by filling out the second constructor parameter when initializing your HuggingFace model. Example:

ts
const { HuggingFaceService } = require("intelligent")

const ai = new HuggingFaceService("API-KEY", {})
// Replace `{}` with your additional parameters