Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-weave-caching.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
W&B Inference を使用すると、W&B Weave および OpenAI 互換の API を通じて、主要なオープンソースの基盤 Models にアクセスできます。以下のことが可能です。
Weave を使用すると、W&B Inference を活用したアプリケーションのトレース、評価、モニタリング、改善を行うことができます。
クイックスタート
Python を使用した簡単な例を以下に示します。
import openai
client = openai.OpenAI(
# カスタム base URL は W&B Inference を指します
base_url='https://api.inference.wandb.ai/v1',
# https://wandb.ai/settings で APIキー を作成してください
api_key="<your-api-key>",
# オプション: 使用状況を追跡するための Team と Project
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)
次のステップ
- 利用可能な Models と 使用方法および制限 を確認する
- 事前準備 ガイドに従ってアカウントを設定する
- API または UI を通じてサービスを利用する
- 使用例 を試す
使用詳細