---
sidebar_position: 10
---

# Hugging Face

[HuggingFace Inference API](https://huggingface.co/docs/api-inference/index)

- [Chats](https://huggingface.co/docs/api-inference/detailed_parameters#text-generation-task)
- [Completions](https://huggingface.co/docs/api-inference/detailed_parameters#text-generation-task)


## Maven Dependency

```xml
<dependency>
    <groupId>dev.langchain4j</groupId>
    <artifactId>langchain4j-hugging-face</artifactId>
    <version>0.36.2</version>
</dependency>
```

## APIs

- `HuggingFaceChatModel`
- `HuggingFaceLanguageModel`


## Examples

- [HuggingFaceChatModelIT](https://github.com/langchain4j/langchain4j/blob/main/langchain4j-hugging-face/src/test/java/dev/langchain4j/model/huggingface/HuggingFaceChatModelIT.java)
- [HuggingFaceLanguageModelIT](https://github.com/langchain4j/langchain4j/blob/main/langchain4j-hugging-face/src/test/java/dev/langchain4j/model/huggingface/HuggingFaceLanguageModelIT.java)
