Tlola ho litaba
Tlhahisoleseling ea Bahlahisi

19. Litšupiso tsa Moahi

Likonteraka tsa sechaba tse netefalitsoeng ka ts’ebetso ea ‘nete
from Xurcroh import Xurcroh

with Xurcroh(
    cluster={"endpoint": "local://cpu"},
    model_path={"tiny": "/models/tiny"},
) as client:
    response = client.chat.completions.create(
        model="tiny",
        messages=[{"role": "user", "content": "Hello!"}],
    )
    print(response.choices[0].message.content)

Sebaka sa API

Xurcroh le AsyncXurcroh li pepesa .chat.completions.create, .images.generate/.images.edit le .videos.generate. Likarabo li kenyelletsa lintho tsa choices/messages/deltas, usage le metadata ea ts’ebetso. Litekanyetso li koahela sampling, max tokens, streaming, timeout, ID ea ho hlakola, seed le likenyo tse khethehileng tsa modality.

model_path e amohela tsela e le ‘ngoe kapa litlhaloso tse bitsoang. Li-worker tsa cluster li tšehetsa li-endpoint, SSH, metadata ea GPU, li-label, lihlopha, bafani, lisebelisoa le litšupiso tsa tikoloho tsa lisebelisoa tsa boitsebiso. Li-model tse sa tsejoeng le litlhophiso tse sa lumellaneng li hloleha pele ho ts’ebetso moo ho khonehang.

Mapa oa mohloli le liphoso

  • python/Xurcroh: facade e tsitsitseng ea sechaba.
  • python/xurcroh/runtime: ts’ebetso ea ‘nete ea lehae/ea hōle le potoloho ea bophelo.
  • python/xurcroh/shards: compiler, li-manifest le li-loader tse thata.
  • crates: protocol, crypto le QUIC.
  • native/cuda: memori le masking.
  • apps/web-manual: litokomane tse ikemetseng.

Liphoso li tsoa ho XurcrohError: tlhophiso, ho batla/ho kenya model, bokhoni, cluster, protocol, attestation, shard, timeout, ho hlakola le client e koetsoeng. Ha ho mokhoa o khutlisang bokhoni ba maiketsetso ha adapter e se teng.

Kgetha puo ya hao

Dipuo tsohle di lekana. Kgetha eo o batlang ho e sebedisa ha o bala.

Yuropa

Middle East le Afrika Leboea

Asia Boroa

Asia Boroa-Botjhabela

Asia Botjhabela

Asia e Bohareng le Caucasus

Afrika

Oceania

Lipuo tse Entsoeng le tsa Khale