Novita AIは、Langfuseとの戦略的統合により、LLMアプリケーション開発に革命をもたらしました。Novita AIにLangfuseのモニタリング機能を組み合わせることで、開発者はAIアプリケーションのデプロイと分析を行うための包括的なソリューションを利用できるようになります。この記事では、組織がNovita AIのOpenAI互換APIエンドポイントを活用しながら、Langfuseの強力な分析ツールを使用して開発ワークフローを効率化し、さまざまな業界でのイノベーションを加速する方法を紹介します。
Langfuseとは?
Langfuseは、オープンソースのLLMエンジニアリングプラットフォームです。チームが協力してAIアプリケーションの開発、モニタリング、評価、デバッグを行うのに役立ちます。Langfuseは数分でセルフホストでき、実戦でテストされています。
主な機能
- 高性能推論: Novita AIは、vLLMの革新的なPagedAttentionアルゴリズムを活用して、大規模言語モデルに最適化された推論機能を提供します。
- クラウドインフラ: このプラットフォームは、スケーラブルなGPUクラウドインフラを通じて、開発者に高性能な計算リソースへのアクセスを提供します。
- オープンソースサポート: Novita AIは、LLaMA 3.1のようなモデルの簡単なデプロイを可能にし、技術革新を促進することで、オープンソースエコシステムを積極的にサポートしています。
- 開発者ツール: 開発者は、Novita AIのシンプルなAPI構造と包括的なベンチマークツールにより、効率的なワークフローの恩恵を受けられます。
- コスト効率: このプラットフォームは、AIアプリケーションを効率的に構築およびスケーリングするための、手頃な価格で信頼性の高いGPUクラウドソリューションを提供します。
- エンタープライズ統合: 組織は、Novita AIのインフラを活用して、さまざまな業界で画期的なAIアプリケーションを作成およびスケーリングできます。
前提条件
始める前に、以下のものを用意してください。
- Novita AI LLM APIキー:
- Novita AIのウェブサイトにアクセスし、アカウントを作成します。
- ログイン後、Key Managementページに移動してAPIキーを生成します。このキーは、Novita AIのモデルをLangfuseに接続するために必要です。
2. Langfuseアカウント:
- Langfuse でLangfuseアカウントにサインアップして、AIアプリケーションの構築を開始します。

統合手順
ステップ1: 依存関係のインストール
- 必要なPythonパッケージがインストールされていることを確認します。
pip install openai langfuse
ステップ2: 環境変数の設定
import os
# プロジェクト設定ページからプロジェクトのキーを取得
# https://cloud.langfuse.com
os.environ["LANGFUSE_PUBLIC_KEY"] = "pk-..." # DOCS EXAMPLE KEYS
os.environ["LANGFUSE_SECRET_KEY"] = "sk-..." # DOCS EXAMPLE KEYS
os.environ["LANGFUSE_HOST"] = "https://cloud.langfuse.com" # 🇪🇺 EUリージョン
# os.environ["LANGFUSE_HOST"] = "https://us.cloud.langfuse.com" # 🇺🇸 USリージョン
# プロジェクト設定ページからNovita AI APIキーを取得
os.environ["NOVITA_API_KEY"] = "..."
ステップ3: Langfuse OpenAIドロップイン置き換え
- このステップでは、
from langfuse.openai import openaiとインポートして、ネイティブのOpenAIドロップイン置き換えを使用します。 - Novita AIをOpenAIのクライアントライブラリで使用するには、
api_keyオプションにNovita AIのAPIキーを渡し、base_urlをhttps://api.novita.ai/v3/openaiに変更します。
# import openai の代わりに:
from langfuse.openai import openai
client = openai.OpenAI(
api_key=os.environ.get("NOVITA_API_KEY"),
base_url="https://api.novita.ai/v3/openai",
)
注記: OpenAIドロップイン置き換えは、低レベルLangfuse Python SDK および @observe()デコレータ と完全に互換性があり、アプリケーションのすべての部分をトレースできます。
ステップ4: サンプルの実行
- 以下のセルは、トレースされたOpenAIクライアントを使用してNovita AIのチャットモデルを呼び出す方法を示しています。すべてのAPI呼び出しは、Langfuseによって自動的にトレースされます。
client = openai.OpenAI(
api_key=os.environ.get("NOVITA_API_KEY"),
base_url="https://api.novita.ai/v3/openai",
)
response = client.chat.completions.create(
model="meta-llama/llama-3.1-70b-instruct",
messages=[
{"role": "system", "content": "Act like you are a helpful assistant."},
{"role": "user", "content": "What are the famous attractions in San Francisco?"},
]
)
print(response.choices[0].message.content)
San Francisco, one of the most iconic cities in the world, is home to a plethora of famous attractions that cater to all interests and ages. Here are some of the most popular attractions in San Francisco:
1. **Golden Gate Bridge**: An engineering marvel and a symbol of San Francisco, the Golden Gate Bridge is a must-visit attraction. Take a walk or bike ride across the bridge for spectacular views of the city and the Bay.
2. **Alcatraz Island**: Explore the infamous former prison turned national park, which once housed notorious inmates like Al Capone. Take a ferry to the island and enjoy a guided tour of the prison and its surroundings.
3. **Fisherman's Wharf**: A bustling waterfront district, Fisherman's Wharf is famous for its seafood restaurants, street performers, and stunning views of the Bay Bridge and Alcatraz Island. Don't miss the sea lions at Pier 39!
4. **Chinatown**: San Francisco's Chinatown is one of the largest and oldest in the United States. Explore the colorful streets, try some authentic Chinese cuisine, and shop for unique souvenirs.
5. **Golden Gate Park**: A sprawling urban park that's home to several attractions, including the de Young Museum, the California Academy of Sciences, and the Japanese Tea Garden.
6. **Cable Cars**: A classic San Francisco experience, the cable cars offer a fun and historic way to explore the city. Take a ride on the Powell-Mason line to Fisherman's Wharf, or the Powell-Hyde line to Lombard Street.
7. **Lombard Street**: Known as the "crookedest street in the world," Lombard Street is a scenic and winding road that offers stunning views of the city.
8. **Union Square**: A vibrant public square in the heart of the city, Union Square is surrounded by shopping, dining, and entertainment options. Catch a show at the historic Curran Theatre or take a stroll through the square.
9. **The Painted Ladies**: A row of colorful Victorian houses on Alamo Square, the Painted Ladies are a iconic symbol of San Francisco's architecture. Take a photo in front of these stunning homes.
10. **The Exploratorium**: A museum of science, art, and human perception, the Exploratorium is a great place to learn and have fun. With interactive exhibits and stunning views of the Bay, it's a must-visit for families and science enthusiasts.
11. **Pier 39**: A popular shopping and dining destination, Pier 39 offers stunning views of the Bay Bridge, Alcatraz Island, and the sea lions that call the pier home.
12. **The de Young Museum**: A fine arts museum located in Golden Gate Park, the de Young Museum features a diverse collection of art and cultural exhibitions from around the world.
These are just a few of the many famous attractions in San Francisco. Whether you're interested in history, culture, science, or entertainment, San Francisco has something for everyone.
ステップ5: Langfuseでトレースを確認
- サンプルモデル呼び出しを実行した後、Langfuseでトレースを確認できます。Novita AIのAPI呼び出しに関する詳細情報が表示されます。これには以下のものが含まれます:
- リクエストパラメータ(モデル、メッセージ、温度など)
- レスポンスの内容
- トークン使用統計
- レイテンシメトリクス

Langfuseにおける公開サンプルトレースリンク
便利なリンクとリソース
LangfuseとNovita AIの理解と使用をさらに深めるには、以下の貴重なリソースを参照してください。
まとめ
Novita AIとvLLMは戦略的パートナーシップを結び、最先端の技術によるAIデプロイに革命をもたらしました。このパートナーシップは、両社がオープンソースAI技術の推進と、開発ライフサイクル全体にわたるイノベーションの促進に取り組んでいることを示しています。
よくある質問
Novita AIのAPI構造はLangfuseのモニタリング機能と互換性がありますか?
はい、Novita AIはシンプルなAPI構造を提供しており、Langfuseの可観測性機能を実装するのに最適です。
この統合はエンタープライズ規模のAIアプリケーションに適していますか?
はい、Novita AIのインフラとLangfuseのモニタリング機能の組み合わせは、組織がさまざまな業界でAIソリューションを効率的にスケーリングできるように特別に設計されています。
Novita AIとLangfuseの統合には複雑なAPIの変更が必要ですか?
いいえ、Novita AIのプラットフォームはシンプルなAPI構造で設計されています。
期間限定オファー
Novita AIでは現在、Heliconeユーザーにとってメリットとなる紹介プログラムを提供しています。興味がある場合、ユーザーは招待リンク/コードを共有でき、紹介者と被紹介者の両方がDeepSeek R1 & V3 APIで使用できる$20のクレジットを受け取れます。
Novita AIについて
Novita AI は、シンプルなAPIを使用してAIモデルを簡単にデプロイできるAIクラウドプラットフォームであり、同時に手頃な価格で信頼性の高いGPUクラウドを構築およびスケーリングのために提供しています。
