Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-john-wbdocs-2044-rename-serverless-products.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
weave / WeaveClient
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new WeaveClient(traceServerApi, wandbServerApi, projectId, settings?): WeaveClient
Parameters
| Name | Type |
|---|
traceServerApi | Api<any> |
wandbServerApi | WandbServerApi |
projectId | string |
settings | Settings |
Returns
WeaveClient
Defined in
weaveClient.ts:100
Properties
projectId
• projectId: string
Defined in
weaveClient.ts:103
settings
• settings: Settings
Defined in
weaveClient.ts:104
traceServerApi
• traceServerApi: Api<any>
Defined in
weaveClient.ts:101
Methods
addScore
▸ addScore(predictCallId, scorerCallId, runnableRefUri, scorerOutput): Promise<string>
Add a scorer result (e.g., scorer output) to a call.
Used in imperative evaluation to attach scorer results to predict calls.
Parameters
| Name | Type | Description |
|---|
predictCallId | string | ID of the predict call to attach feedback to |
scorerCallId | string | ID of the scorer call that generated the feedback |
runnableRefUri | string | URI of the scorer (Op or Object ref) |
scorerOutput | any | Output of the scorer |
Returns
Promise<string>
Defined in
weaveClient.ts:908
createCall
▸ createCall(internalCall, opRef, params, parameterNames, thisArg, currentCall, parentCall, startTime, displayName?, attributes?): Promise<void>
Parameters
| Name | Type |
|---|
internalCall | InternalCall |
opRef | any |
params | any[] |
parameterNames | ParameterNamesOption |
thisArg | any |
currentCall | CallStackEntry |
parentCall | undefined | CallStackEntry |
startTime | Date |
displayName? | string |
attributes? | Record<string, any> |
Returns
Promise<void>
Defined in
weaveClient.ts:763
finishCall
▸ finishCall(call, result, currentCall, parentCall, summarize, endTime, startCallPromise): Promise<void>
Parameters
| Name | Type |
|---|
call | InternalCall |
result | any |
currentCall | CallStackEntry |
parentCall | undefined | CallStackEntry |
summarize | undefined | (result: any) => Record<string, any> |
endTime | Date |
startCallPromise | Promise<void> |
Returns
Promise<void>
Defined in
weaveClient.ts:815
finishCallWithException
▸ finishCallWithException(call, error, currentCall, parentCall, endTime, startCallPromise): Promise<void>
Parameters
| Name | Type |
|---|
call | InternalCall |
error | any |
currentCall | CallStackEntry |
parentCall | undefined | CallStackEntry |
endTime | Date |
startCallPromise | Promise<void> |
Returns
Promise<void>
Defined in
weaveClient.ts:855
get
▸ get(ref): Promise<any>
Parameters
Returns
Promise<any>
Defined in
weaveClient.ts:289
getCall
▸ getCall(callId, includeCosts?): Promise<Call>
Parameters
| Name | Type | Default value |
|---|
callId | string | undefined |
includeCosts | boolean | false |
Returns
Promise<Call>
Defined in
weaveClient.ts:220
getCallStack
▸ getCallStack(): CallStack
Returns
CallStack
Defined in
weaveClient.ts:674
getCalls
▸ getCalls(filter?, includeCosts?, limit?): Promise<Call[]>
Parameters
| Name | Type | Default value |
|---|
filter | CallsFilter | {} |
includeCosts | boolean | false |
limit | number | 1000 |
Returns
Promise<Call[]>
Defined in
weaveClient.ts:230
getCallsIterator
▸ getCallsIterator(filter?, includeCosts?, limit?): AsyncIterableIterator<CallSchema>
Parameters
| Name | Type | Default value |
|---|
filter | CallsFilter | {} |
includeCosts | boolean | false |
limit | number | 1000 |
Returns
AsyncIterableIterator<CallSchema>
Defined in
weaveClient.ts:244
getCurrentAttributes
▸ getCurrentAttributes(): Record<string, any>
Returns
Record<string, any>
Defined in
weaveClient.ts:678
publish
▸ publish(obj, objId?): Promise<ObjectRef>
Parameters
| Name | Type |
|---|
obj | any |
objId? | string |
Returns
Promise<ObjectRef>
Defined in
weaveClient.ts:208
pushNewCall
▸ pushNewCall(): Object
Returns
Object
| Name | Type |
|---|
currentCall | CallStackEntry |
newStack | CallStack |
parentCall? | CallStackEntry |
Defined in
weaveClient.ts:682
runWithAttributes
▸ runWithAttributes<T>(attributes, fn): T
Type parameters
Parameters
| Name | Type |
|---|
attributes | Record<string, any> |
fn | () => T |
Returns
T
Defined in
weaveClient.ts:690
runWithCallStack
▸ runWithCallStack<T>(callStack, fn): T
Type parameters
Parameters
| Name | Type |
|---|
callStack | CallStack |
fn | () => T |
Returns
T
Defined in
weaveClient.ts:686
saveCallEnd
▸ saveCallEnd(callEnd): void
Parameters
| Name | Type |
|---|
callEnd | EndedCallSchemaForInsert |
Returns
void
Defined in
weaveClient.ts:669
saveCallStart
▸ saveCallStart(callStart): void
Parameters
| Name | Type |
|---|
callStart | StartedCallSchemaForInsert |
Returns
void
Defined in
weaveClient.ts:664
saveOp
▸ saveOp(op, objId?): Promise<any>
Parameters
| Name | Type |
|---|
op | Op<(…args: any[]) => any> |
objId? | string |
Returns
Promise<any>
Defined in
weaveClient.ts:729
serializeAudio
▸ serializeAudio(data, audioType?): Promise<any>
Upload raw audio bytes to the Weave content store and return the
CustomWeaveType placeholder that can be embedded in a call output.
Use this when building call outputs manually (e.g. via saveCallEnd)
where the automatic serialization pipeline from finishCall is not used.
Parameters
| Name | Type | Default value | Description |
|---|
data | Buffer | undefined | Raw audio bytes (WAV for best browser compatibility) |
audioType | "wav" | DEFAULT_AUDIO_TYPE | File format — currently only ‘wav’ is supported |
Returns
Promise<any>
Defined in
weaveClient.ts:616
updateCall
▸ updateCall(callId, displayName): Promise<void>
Parameters
| Name | Type |
|---|
callId | string |
displayName | string |
Returns
Promise<void>
Defined in
weaveClient.ts:891
waitForBatchProcessing
▸ waitForBatchProcessing(): Promise<void>
Returns
Promise<void>
Defined in
weaveClient.ts:121