Aan de slag met Dell Pro AI Studio met behulp van codevoorbeelden

Summary: Meer informatie over essentiële codevoorbeelden die ontwikkelaars en IT-professionals kunnen helpen aan de slag te gaan met het gebruik van de kracht van 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 is een uitgebreide toolkit die is ontworpen om de ontwikkeling, implementatie en het beheer van AI-applicaties op Dell AI-pc's te vereenvoudigen en te versnellen.


Betreffende producten:

  • Dell Pro AI Studio

Mijn programma maakt momenteel gebruik van OpenAI API's en is ingesteld op het gebruik van cloudservices. Hoe kan ik overstappen op het gebruik van lokale Dell Pro AI Studio-modellen en rekencapaciteit?

Dell Pro AI Studio is ontworpen om bepaalde workloads over te hevelen naar lokale computing. Als uw huidige AI-toepassing een OpenAI API-configuratie gebruikt, hebt u waarschijnlijk een code die eruitziet als de onderstaande code:

Voorbeeld van Python-code:

client = OpenAI(
base_url="https://your-custom-endpoint",
api_key="your-api-key",
)
Opmerking:
  • your-custom-endpoint = De URL van uw aangepaste eindpunt
  • your-api-key = De API-sleutel van je AI

Nadat u Dell Pro AI Studio hebt geïnstalleerd, kunt u uw applicatieconfiguratie wijzigen van het bovenstaande naar het onderstaande.

Voorbeeld van Python-code:

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

Mijn app vereist streamingfunctionaliteit. Ondersteunt Dell Pro AI Studio Framework streaming?

Absoluut! Gewoonlijk moet voor uw code het argument Stream-trefwoord worden toegevoegd aan een functieaanroep.

Voorbeeld van http-code met Phi 3.5:

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

Voorbeeld van Python-code:

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.