## TL;DR

For "AttributeError: 'InferenceClient' object has no attribute 'post'": install dependencies from agno-ai. Set up a valid Hugging Face API token and MongoDB URI.

```text
AttributeError: 'InferenceClient' object has no attribute 'post'
```

## Steps

1. Issue agno-agi/agno#3331 (closed, 20 comments): ### Description When attempting to initialize and use HuggingfaceCustomEmbedder, an AttributeError is raised: `AttributeError: 'InferenceClient' object has no attribute 'post'` This error suggests that HuggingfaceCustomEmbedder attempts to call a .post() method on an instance of InferenceClient, which does not exist in the current version of the huggingface_hub package. ### Steps to Reproduce 1. Install dependencies from agno-ai. 2. Set up a valid Hugging Face API token and MongoDB URI. 3. Use the following code to initialize the embedder and vector DB: ``` embedder =...

2. [kausmeows (commenter)]: This one is fixed in Agno itself, so first update to the latest agno release (pip install -U agno). The maintainer confirmed the InferenceClient.post AttributeError no longer happens on the current version. Note the remaining error in the thread came from someone using langchain's HuggingFaceHub, not Agno, so if you mix libraries check which one is actually raising.

3. This comes from one real issue thread (https://github.com/agno-agi/agno/issues/3331); it is the verified fix or approach from that thread, not a general manual. Check your version of Agno first , maintainers often fix the underlying bug in a later release, and the thread may predate it.

Expected: The maintainer confirmed the InferenceClient.post AttributeError no longer happens on the current version.

## When to use

You are seeing this: The maintainer confirmed the InferenceClient.post AttributeError no longer happens on the current version. Use this skill when you run into "AttributeError: 'InferenceClient' object has no attribute 'post' on HuggingfaceCustomEmbedder".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

Install dependencies from agno-ai.

## Edge cases

- Note the remaining error in the thread came from someone using langchain's HuggingFaceHub, not Agno, so if you mix libraries check which one is actually raising.

## Sources

- https://github.com/agno-agi/agno/issues/3331
