- ホスティングプロバイダーへの登録やモデルのセルフホスティングをせずに、AI アプリケーションやエージェントを構築する
- サポート対象モデル を W&B Weave Playground で試す
クイックスタート
次のステップ
利用の詳細
料金、利用制限、クレジットについては、利用情報と制限を参照してください。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Help us improve these docs. Take our quick survey.
W&B Weave と OpenAI 互換 API 経由でオープンソースの基盤モデルにアクセス
import openai
client = openai.OpenAI(
# カスタムベースURLはW&B Inferenceを指します
base_url='https://api.inference.wandb.ai/v1',
# https://wandb.ai/settings でAPIキーを作成してください
api_key="<your-api-key>",
# 省略可能: 使用状況トラッキング用のTeamとプロジェクト
project="<your-team>/<your-project>",
)
response = client.chat.completions.create(
model="meta-llama/Llama-3.1-8B-Instruct",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Tell me a joke."}
],
)
print(response.choices[0].message.content)