コード サンプルを使用してDell Pro AI Studioを開始する方法

Summary: 開発者やITプロフェッショナルがDell Pro AI Studioの機能を活用するのに役立つ重要なコード サンプルをご紹介します。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

Dell Pro AI Studioは、Dell AI PCでのAIアプリケーションの開発、導入、管理をシンプルにして迅速化するために設計された包括的なツールキットです。


対象製品:

  • Dell Pro AI Studio

現在、プログラムで OpenAI API を使用しており、クラウド サービスを使用するように設定されています。Dell Pro AI Studioのローカル モデルとコンピューティングの使用に移行するにはどうすればよいですか?

Dell Pro AI Studioは、特定のワークロードをローカル コンピューティングにリフト アンド シフトするように設計されています。現在の AI アプリケーションで OpenAI API 構成を使用している場合は、次のコードのようなコードがある可能性があります。

Pythonコード例:

client = OpenAI(
base_url="https://your-custom-endpoint",
api_key="your-api-key",
)
注:
  • your-custom-endpoint = カスタム エンドポイントの URL
  • your-api-key = AIのAPIキー

Dell Pro AI Studioをインストールしたら、アプリケーション構成を上記から以下に変更できます。

Pythonコード例:

client = OpenAI(
    base_url="http://localhost:8553/v1/openai",
    api_key="dpais"
)

アプリでストリーミング機能が必要ですが、Dell Pro AI Studio Frameworkはストリーミングをサポートしていますか?

そうですよ!通常、コードでは、関数呼び出しに Stream キーワード引数を追加する必要があります。

Phi 3.5を使用したHTTPコード例:

{
        "model": "phi3.5",
        "messages": [
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user",   "content": "Hello"},
        ],
        "stream": "true"
    }

Pythonコード例:

messages=[{"role": "system", "content": "You are concise."},
                {"role": "user",   "content": "Say hi"}]
resp = client.chat.completions.create(
            model=Phi3.5,
            messages=messages,
            stream=True,
        )

Affected Products

Dell Pro AI Studio
Article Properties
Article Number: 000322409
Article Type: How To
Last Modified: 24 Oct 2025
Version:  2
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.