Table des matières
Constructeurs
Propriétés
Méthodes
- addScore
- createCall
- finishCall
- finishCallWithException
- get
- getCall
- getCallStack
- getCalls
- getCallsIterator
- getCurrentAttributes
- publish
- pushNewCall
- runWithAttributes
- runWithCallStack
- saveCallEnd
- saveCallStart
- saveOp
- serializeAudio
- updateCall
- waitForBatchProcessing
Constructeurs
constructeur
traceServerApi, wandbServerApi, projectId, settings?): WeaveClient
Paramètres
| Nom | Type |
|---|---|
traceServerApi | Api<any> |
wandbServerApi | WandbServerApi |
projectId | string |
settings | Settings |
Renvoie
WeaveClient
Défini dans
Propriétés
projectId
string
Défini dans
settings
Settings
Défini dans
traceServerApi
Api<any>
Défini dans
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.
Paramètres
| 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 |
Renvoie
Promise<string>
Défini dans
createCall
internalCall, opRef, params, parameterNames, thisArg, currentCall, parentCall, startTime, displayName?, attributes?): Promise<void>
Paramètres
| 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> |
Renvoie
Promise<void>
Défini dans
finishCall
call, result, currentCall, parentCall, summarize, endTime, startCallPromise): Promise<void>
Paramètres
| Nom | Type | |
|---|---|---|
call | InternalCall | |
result | any | |
currentCall | CallStackEntry | |
parentCall | undefined | CallStackEntry |
summarize | undefined | (result: any) => Record<string, any> |
endTime | Date | |
startCallPromise | Promise<void> |
Renvoie
Promise<void>
Défini dans
finishCallWithException
call, error, currentCall, parentCall, endTime, startCallPromise): Promise<void>
Paramètres
| Nom | Type | |
|---|---|---|
call | InternalCall | |
error | any | |
currentCall | CallStackEntry | |
parentCall | undefined | CallStackEntry |
endTime | Date | |
startCallPromise | Promise<void> |
Renvoie
Promise<void>
Défini dans
get
ref): Promise<any>
Paramètres
| Nom | Type |
|---|---|
ref | ObjectRef |
Renvoie
Promise<any>
Défini dans
getCall
callId, includeCosts?): Promise<Appel>
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
callId | string | undefined |
includeCosts | boolean | false |
Renvoie
Promise<Appel>
Défini dans
getCallStack
CallStack
Renvoie
CallStack
Défini dans
getCalls
filter?, includeCosts?, limit?): Promise<Appel[]>
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
filter | CallsFilter | {} |
includeCosts | boolean | false |
limit | number | 1000 |
Renvoie
Promise<Appel[]>
Défini dans
getCallsIterator
filter?, includeCosts?, limit?): AsyncIterableIterator<CallSchema>
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
filter | CallsFilter | {} |
includeCosts | boolean | false |
limit | number | 1000 |
Renvoie
AsyncIterableIterator<CallSchema>
Défini dans
getCurrentAttributes
Record<string, any>
Renvoie
Record<string, any>
Défini dans
publish
obj, objId?): Promise<ObjectRef>
Paramètres
| Nom | Type |
|---|---|
obj | any |
objId? | string |
Renvoie
Promise<ObjectRef>
Défini dans
pushNewCall
objet
Renvoie
objet
| Nom | Type |
|---|---|
currentCall | CallStackEntry |
newStack | CallStack |
parentCall? | CallStackEntry |
Défini dans
runWithAttributes
T>(attributes, fn): T
Paramètres de type
| Nom |
|---|
T |
Paramètres
| Nom | Type |
|---|---|
attributes | Record<string, any> |
fn | () => T |
Renvoie
T
Défini dans
runWithCallStack
T>(callStack, fn): T
Paramètres de type
| Nom |
|---|
T |
Paramètres
| Nom | Type |
|---|---|
callStack | CallStack |
fn | () => T |
Renvoie
T
Défini dans
saveCallEnd
callEnd): void
Paramètres
| Nom | Type |
|---|---|
callEnd | EndedCallSchemaForInsert |
Renvoie
void
Défini dans
saveCallStart
callStart): void
Paramètres
| Nom | Type |
|---|---|
callStart | StartedCallSchemaForInsert |
Renvoie
void
Défini dans
saveOp
op, objId?): Promise<any>
Paramètres
| Nom | Type |
|---|---|
op | Op<(…args: any[]) => any> |
objId? | string |
Renvoie
Promise<any>
Défini dans
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é.
Paramètres
| 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 |
Renvoie
Promise<any>
Défini dans
updateCall
callId, displayName): Promise<void>
Paramètres
| Nom | Type |
|---|---|
callId | string |
displayName | string |
Renvoie
Promise<void>
Défini dans
waitForBatchProcessing
Promise<void>
Renvoie
Promise<void>