> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-wbdocs-1882.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Together AI

> OpenAI SDK との互換性を利用して、Weave で Together AI のオープンソース LLM をトラッキングし、モデル呼び出しのトレースと評価をシームレスに行います。

Together AI は、生成 AI モデルの構築とファインチューニングのためのプラットフォームです。オープンソース LLM に注力しており、ユーザーは独自のモデルをファインチューニングしてホストできます。

<Info>
  Weave による `together` Python パッケージの完全サポートは現在開発中です
</Info>

`together` Python パッケージに対する Weave の完全サポートは現在開発中ですが、Together は OpenAI SDK との互換性 ([ドキュメント](https://docs.together.ai/docs/openai-api-compatibility)) をサポートしており、Weave はこれを自動的に検出して連携します。

Together API を使用するには、APIキーをお使いの [Together API](https://docs.together.ai/docs/quickstart) キーに、`base_url` を `https://api.together.xyz/v1` に、モデルを [チャットモデル](https://docs.together.ai/docs/inference-models#chat-models) のいずれかに変更するだけです。

```python lines {5, 10-13} theme={null}
import os
import openai
import weave

weave.init('together-weave')

system_content = "You are a travel agent. Be descriptive and helpful."
user_content = "Tell me about San Francisco"

client = openai.OpenAI(
    api_key=os.environ.get("TOGETHER_API_KEY"),
    base_url="https://api.together.xyz/v1",
)
chat_completion = client.chat.completions.create(
    model="mistralai/Mixtral-8x7B-Instruct-v0.1",
    messages=[
        {"role": "system", "content": system_content},
        {"role": "user", "content": user_content},
    ],
    temperature=0.7,
    max_tokens=1024,
)
response = chat_completion.choices[0].message.content
print("Together response:\n", response)
```

これは使い始めるためのシンプルな例ですが、より複雑なユースケースで独自の関数を Weave に統合する方法について詳しくは、[OpenAI](/ja/weave/guides/integrations/openai#track-your-own-ops) ガイドを参照してください。
