Copy
---
title: ChatFeatherlessAi
---
이 문서는 FeatherlessAi [chat models](/oss/python/langchain/models) 시작하는 데 도움을 드립니다. 모든 ChatFeatherlessAi 기능 및 구성에 대한 자세한 문서는 [API reference](https://python.langchain.com/api_reference/__package_name_short_snake__/chat_models/__module_name__.chat_models.ChatFeatherlessAi.html)를 참조하세요.
- 예시는 [featherless.ai/](https://featherless.ai/)를 참조하세요.
## Overview
### Integration details
| Class | Package | Local | Serializable | [JS support](https://js.langchain.com/docs/integrations/chat/__package_name_short_snake__) | Downloads | Version |
| :--- | :--- | :---: | :---: | :---: | :---: | :---: |
| [ChatFeatherlessAi](https://python.langchain.com/api_reference/__package_name_short_snake__/chat_models/__module_name__.chat_models.ChatFeatherlessAi.html) | [langchain-featherless-ai](https://python.langchain.com/api_reference/__package_name_short_snake__/) | ✅ | ❌ | ❌ |  |  |
### Model features
| [Tool calling](/oss/python/langchain/tools) | [Structured output](/oss/python/langchain/structured-output) | JSON mode | [Image input](/oss/python/langchain/messages#multimodal) | Audio input | Video input | [Token-level streaming](/oss/python/langchain/streaming/) | Native async | [Token usage](/oss/python/langchain/models#token-usage) | [Logprobs](/oss/python/langchain/models#log-probabilities) |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| ❌ | ❌ | ✅| ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ |
## Setup
Featherless AI 모델에 액세스하려면 Featherless AI 계정을 생성하고 API key를 발급받은 후 `langchain-featherless-ai` integration package를 설치해야 합니다.
### Credentials
[featherless.ai/](https://featherless.ai/)로 이동하여 FeatherlessAI에 가입하고 API key를 생성하세요. 완료한 후 FEATHERLESSAI_API_KEY environment variable을 설정하세요:
```python
import getpass
import os
if not os.getenv("FEATHERLESSAI_API_KEY"):
os.environ["FEATHERLESSAI_API_KEY"] = getpass.getpass(
"Enter your FeatherlessAI API key: "
)
Copy
os.environ["LANGSMITH_TRACING"] = "true"
os.environ["LANGSMITH_API_KEY"] = getpass.getpass("Enter your LangSmith API key: ")
Installation
LangChain FeatherlessAi integration은langchain-featherless-ai package에 있습니다:
Copy
pip install -qU langchain-featherless-ai
Copy
Note: you may need to restart the kernel to use updated packages.
Instantiation
이제 model object를 인스턴스화하고 chat completion을 생성할 수 있습니다:Copy
from langchain_featherless_ai import ChatFeatherlessAi
llm = ChatFeatherlessAi(
model="featherless-ai/Qwerky-72B",
temperature=0.9,
max_tokens=None,
timeout=None,
)
Invocation
Copy
messages = [
(
"system",
"You are a helpful assistant that translates English to French. Translate the user sentence.",
),
("human", "I love programming."),
]
ai_msg = llm.invoke(messages)
ai_msg
Copy
c:\Python311\Lib\site-packages\pydantic\main.py:463: UserWarning: Pydantic serializer warnings:
PydanticSerializationUnexpectedValue(Expected `int` - serialized value may not be as expected [input_value=1747322408.706, input_type=float])
return self.__pydantic_serializer__.to_python(
Copy
AIMessage(content="J'aime programmer.", additional_kwargs={'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 5, 'prompt_tokens': 27, 'total_tokens': 32, 'completion_tokens_details': None, 'prompt_tokens_details': None}, 'model_name': 'featherless-ai/Qwerky-72B', 'system_fingerprint': '', 'id': 'G1sgui', 'service_tier': None, 'finish_reason': 'stop', 'logprobs': None}, id='run--6ecbe184-c94e-4d03-bf75-9bd85b04ba5b-0', usage_metadata={'input_tokens': 27, 'output_tokens': 5, 'total_tokens': 32, 'input_token_details': {}, 'output_token_details': {}})
Copy
print(ai_msg.content)
Copy
J'aime programmer.
API reference
모든 ChatFeatherlessAi 기능 및 구성에 대한 자세한 문서는 API reference를 참조하세요Copy
---
<Callout icon="pen-to-square" iconType="regular">
[Edit the source of this page on GitHub.](https://github.com/langchain-ai/docs/edit/main/src/oss/python/integrations/chat/featherless_ai.mdx)
</Callout>
<Tip icon="terminal" iconType="regular">
[Connect these docs programmatically](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
</Tip>