Logo
Type aliases

HuggingFaceInferenceApiEmbedding

HuggingFaceInferenceApiEmbedding = object

Defined in: packages/cloud/src/client/types.gen.ts:3801

Properties

model_name?

optional model_name: string | null

Defined in: packages/cloud/src/client/types.gen.ts:3805

Hugging Face model name. If None, the task will be used.


embed_batch_size?

optional embed_batch_size: number

Defined in: packages/cloud/src/client/types.gen.ts:3809

The batch size for embedding calls.


num_workers?

optional num_workers: number | null

Defined in: packages/cloud/src/client/types.gen.ts:3813

The number of workers to use for async embedding calls.


pooling?

optional pooling: Pooling | null

Defined in: packages/cloud/src/client/types.gen.ts:3817

Pooling strategy. If None, the model's default pooling is used.


query_instruction?

optional query_instruction: string | null

Defined in: packages/cloud/src/client/types.gen.ts:3821

Instruction to prepend during query embedding.


text_instruction?

optional text_instruction: string | null

Defined in: packages/cloud/src/client/types.gen.ts:3825

Instruction to prepend during text embedding.


token?

optional token: string | boolean | null

Defined in: packages/cloud/src/client/types.gen.ts:3829

Hugging Face token. Will default to the locally saved token. Pass token=False if you don’t want to send your token to the server.


timeout?

optional timeout: number | null

Defined in: packages/cloud/src/client/types.gen.ts:3833

The maximum number of seconds to wait for a response from the server. Loading a new model in Inference API can take up to several minutes. Defaults to None, meaning it will loop until the server is available.


headers?

optional headers: {[key: string]: string; } | null

Defined in: packages/cloud/src/client/types.gen.ts:3837

Additional headers to send to the server. By default only the authorization and user-agent headers are sent. Values in this dictionary will override the default values.


cookies?

optional cookies: {[key: string]: string; } | null

Defined in: packages/cloud/src/client/types.gen.ts:3843

Additional cookies to send to the server.


task?

optional task: string | null

Defined in: packages/cloud/src/client/types.gen.ts:3849

Optional task to pick Hugging Face's recommended model, used when model_name is left as default of None.


class_name?

optional class_name: string

Defined in: packages/cloud/src/client/types.gen.ts:3850