Documentation Index
Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
Use this file to discover all available pages before exploring further.
weave / WeaveClient
Constructeurs
• new WeaveClient(traceServerApi, wandbServerApi, projectId, settings?): WeaveClient
| Nom | Type |
|---|
traceServerApi | Api<any> |
wandbServerApi | WandbServerApi |
projectId | string |
settings | Settings |
WeaveClient
weaveClient.ts:100
Propriétés
• projectId: string
weaveClient.ts:103
• settings: Settings
weaveClient.ts:104
• traceServerApi: Api<any>
weaveClient.ts:101
Méthodes
▸ addScore(predictCallId, scorerCallId, runnableRefUri, scorerOutput): Promise<string>
Ajoute un résultat de scorer (par ex. la sortie du scorer) à un appel.
Utilisé dans l’évaluation impérative pour associer les résultats du scorer aux appels de prédiction.
| Nom | Type | Description |
|---|
predictCallId | string | ID de l’appel predict auquel associer le retour |
scorerCallId | string | ID de l’appel du scorer ayant généré le retour |
runnableRefUri | string | URI du scorer (op ou réf. d’objet) |
scorerOutput | any | Résultat du scorer |
Promise<string>
weaveClient.ts:908
▸ createCall(internalCall, opRef, params, parameterNames, thisArg, currentCall, parentCall, startTime, displayName?, attributes?): Promise<void>
| Nom | Type | |
|---|
internalCall | InternalCall | |
opRef | any | |
params | any[] | |
parameterNames | ParameterNamesOption | |
thisArg | any | |
currentCall | CallStackEntry | |
parentCall | undefined | CallStackEntry |
startTime | Date | |
displayName? | string | |
attributes? | Record<string, any> | |
Promise<void>
weaveClient.ts:763
▸ finishCall(call, result, currentCall, parentCall, summarize, endTime, startCallPromise): Promise<void>
| Nom | Type | |
|---|
call | InternalCall | |
result | any | |
currentCall | CallStackEntry | |
parentCall | undefined | CallStackEntry |
summarize | undefined | (result: any) => Record<string, any> |
endTime | Date | |
startCallPromise | Promise<void> | |
Promise<void>
weaveClient.ts:815
▸ finishCallWithException(call, error, currentCall, parentCall, endTime, startCallPromise): Promise<void>
| Nom | Type | |
|---|
call | InternalCall | |
error | any | |
currentCall | CallStackEntry | |
parentCall | undefined | CallStackEntry |
endTime | Date | |
startCallPromise | Promise<void> | |
Promise<void>
weaveClient.ts:855
▸ get(ref): Promise<any>
Promise<any>
weaveClient.ts:289
▸ getCall(callId, includeCosts?): Promise<Appel>
| Nom | Type | Valeur par défaut |
|---|
callId | string | undefined |
includeCosts | boolean | false |
Promise<Appel>
weaveClient.ts:220
▸ getCallStack(): CallStack
CallStack
weaveClient.ts:674
▸ getCalls(filter?, includeCosts?, limit?): Promise<Appel[]>
| Nom | Type | Valeur par défaut |
|---|
filter | CallsFilter | {} |
includeCosts | boolean | false |
limit | number | 1000 |
Promise<Appel[]>
weaveClient.ts:230
▸ getCallsIterator(filter?, includeCosts?, limit?): AsyncIterableIterator<CallSchema>
| Nom | Type | Valeur par défaut |
|---|
filter | CallsFilter | {} |
includeCosts | boolean | false |
limit | number | 1000 |
AsyncIterableIterator<CallSchema>
weaveClient.ts:244
▸ getCurrentAttributes(): Record<string, any>
Record<string, any>
weaveClient.ts:678
▸ publish(obj, objId?): Promise<ObjectRef>
| Nom | Type |
|---|
obj | any |
objId? | string |
Promise<ObjectRef>
weaveClient.ts:208
▸ pushNewCall(): objet
objet
| Nom | Type |
|---|
currentCall | CallStackEntry |
newStack | CallStack |
parentCall? | CallStackEntry |
weaveClient.ts:682
▸ runWithAttributes<T>(attributes, fn): T
| Nom | Type |
|---|
attributes | Record<string, any> |
fn | () => T |
T
weaveClient.ts:690
▸ runWithCallStack<T>(callStack, fn): T
| Nom | Type |
|---|
callStack | CallStack |
fn | () => T |
T
weaveClient.ts:686
▸ saveCallEnd(callEnd): void
| Nom | Type |
|---|
callEnd | EndedCallSchemaForInsert |
void
weaveClient.ts:669
▸ saveCallStart(callStart): void
| Nom | Type |
|---|
callStart | StartedCallSchemaForInsert |
void
weaveClient.ts:664
▸ saveOp(op, objId?): Promise<any>
| Nom | Type |
|---|
op | Op<(…args: any[]) => any> |
objId? | string |
Promise<any>
weaveClient.ts:729
▸ serializeAudio(data, audioType?): Promise<any>
Téléversez des octets audio bruts dans le stockage de contenu Weave, puis renvoyez l’espace réservé CustomWeaveType qui peut être intégré dans la sortie d’un appel.
Utilisez cette méthode lorsque vous créez manuellement des sorties d’appel (par ex. via saveCallEnd) et que le pipeline de sérialisation automatique de finishCall n’est pas utilisé.
| Nom | Type | Valeur par défaut | Description |
|---|
data | Buffer | undefined | Octets audio bruts (WAV pour une compatibilité optimale avec les navigateurs) |
audioType | "wav" | DEFAULT_AUDIO_TYPE | Format de fichier — actuellement, seul « wav » est pris en charge |
Promise<any>
weaveClient.ts:616
▸ updateCall(callId, displayName): Promise<void>
| Nom | Type |
|---|
callId | string |
displayName | string |
Promise<void>
weaveClient.ts:891
▸ waitForBatchProcessing(): Promise<void>
Promise<void>
weaveClient.ts:121