推理提供商文档
Featherless AI
加入 Hugging Face 社区
并获得增强的文档体验
开始使用
Featherless AI
您可以在此处找到所有支持的 Featherless AI 模型
Featherless AI 是一个无服务器 AI 推理平台,提供对数千个开源模型的访问。
我们的目标是让所有 AI 模型都能进行无服务器推理。我们通过 API 为不断扩展的开源模型库提供推理服务。
支持的任务
聊天补全 (LLM)
了解更多关于聊天补全 (LLM) 的信息,请点击这里。
语言
客户端
提供商
import os
from openai import OpenAI
client = OpenAI(
base_url="https://router.huggingface.co/v1",
api_key=os.environ["HF_TOKEN"],
)
completion = client.chat.completions.create(
model="meta-llama/Llama-3.1-8B-Instruct:featherless-ai",
messages=[
{
"role": "user",
"content": "What is the capital of France?"
}
],
)
print(completion.choices[0].message)聊天补全 (VLM)
了解更多关于聊天补全 (VLM) 的信息,请点击这里。
语言
客户端
提供商
import os
from openai import OpenAI
client = OpenAI(
base_url="https://router.huggingface.co/v1",
api_key=os.environ["HF_TOKEN"],
)
completion = client.chat.completions.create(
model="google/gemma-3-27b-it:featherless-ai",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
],
)
print(completion.choices[0].message)文本生成
在此处了解更多关于文本生成的信息。
语言
客户端
提供商
import os
from openai import OpenAI
client = OpenAI(
base_url="https://router.huggingface.co/featherless-ai/v1/completions",
api_key=os.environ["HF_TOKEN"],
)
completion = client.chat.completions.create(
model="meta-llama/Meta-Llama-3.1-8B-Instruct",
messages="\"Can you please let us know more details about your \"",
)
print(completion.choices[0].message)
