Skip to main content
定義元: src/weaveClient.ts:445

プロパティ

projectId

projectId: string
定義元: src/weaveClient.ts:456

settings

settings: Settings
定義元: src/weaveClient.ts:457

traceServerApi

traceServerApi: Api<any>
定義元: src/weaveClient.ts:455

メソッド

addScore()

addScore(predictCallId, scorerCallId, runnableRefUri, scorerOutput): Promise<string>
Scorer の結果 (Scorer の出力など) を Call に追加します。 命令型の評価で、Scorer の結果を予測 Call に関連付けるために使用します。 定義元: src/weaveClient.ts:1727

パラメーター

predictCallId
string フィードバックを紐付ける予測CallのID
scorerCallId
string feedback を生成した Scorer Call の ID
runnableRefUri
string Scorer (Op または Object ref) のURI
scorerOutput
any Scorer の出力

戻り値

Promise<string>

createCall()

createCall(internalCall, opRef, params, parameterNames, thisArg, currentCall, parentCall, startTime, displayName?, attributes?): Promise<void>
定義元: src/weaveClient.ts:1570

パラメーター

internalCall
InternalCall
opRef
any
params
any[]
パラメーター名
ParameterNamesOption
thisArg
any
currentCall
CallStackEntry
parentCall
CallStackEntry | undefined
startTime
Date
表示名?
string
属性?
Record<string, any>

戻り値

Promise<void>

finishCall()

finishCall(call, result, currentCall, parentCall, summarize, endTime, startCallPromise): Promise<void>
定義元: src/weaveClient.ts:1630

パラメーター

call
InternalCall
result
any
currentCall
CallStackEntry
parentCall
CallStackEntry | undefined
summarize
((result) => Record<string, any>) | undefined
終了時刻
Date
startCallPromise
Promise<void>

戻り値

Promise<void>

finishCallWithException()

finishCallWithException(call, error, currentCall, parentCall, endTime, startCallPromise): Promise<void>
定義元: src/weaveClient.ts:1672

パラメーター

call
InternalCall
error
any
currentCall
CallStackEntry
parentCall
CallStackEntry | undefined
終了時刻
Date
startCallPromise
Promise<void>

戻り値

Promise<void>

get()

get(ref): Promise<any>
定義元: src/weaveClient.ts:1025

パラメーター

ref
ObjectRef

戻り値

Promise<any>

getAgentCustomAttributes()

getAgentCustomAttributes(options): Promise<Response<GetAgentCustomAttributesResult>>
project 内のエージェント スパンで検出された、型付きカスタム属性キーを取得します。各結果行は 1 つの (source, key, value_type) トリプルと、そのトリプルを持つスパン数で構成されます。スパンのクエリ、グループ化、統計 API では、この形式でカスタム属性を参照します。 query (構造化スパンフィルター) 、startedAfter / startedBefore (ISO-8601) 、または両方を指定して、対象のスパンをフィルターします。検出されたキーをページングするには、limit / offset を使用します。 定義元: src/weaveClient.ts:772

パラメーター

オプション
GetAgentCustomAttributesOptions

戻り値

Promise<Response<GetAgentCustomAttributesResult>>


getAgents()

getAgents(options?): Promise<Response<GetAgentsResult>>
集計された統計情報を含むエージェントの一覧を取得します。 定義元: src/weaveClient.ts:488

パラメーター

オプション?
GetAgentsOptions = {}

戻り値

Promise<Response<GetAgentsResult>>


getAgentSpans()

getAgentSpans(options): Promise<Response<GetAgentSpansResult>>
エージェント スパンをクエリします。必要に応じて、エージェント名や Mongo スタイルのクエリ式でフィルターできます。 定義元: src/weaveClient.ts:566

パラメーター

オプション
GetAgentSpansOptions

戻り値

Promise<Response<GetAgentSpansResult>>


getAgentSpanStats()

getAgentSpanStats(options): Promise<Response<GetAgentSpanStatsResult>>
project 内のエージェント スパンに対する集約結果を、時系列または時間バケットの可視化に適した行と列のメタデータとして返します。 start (必須) とendで時間範囲を指定します。metricsの各エントリでは、抽出するフィールドと集約方法 (sumavgcount、パーセンタイルなど) を指定します。行を時間単位でバケット化するにはgranularity (秒) を指定し、エージェント/provider/モデルなどごとに結果を分けるにはgroupByを指定します。queryは、集約前に対象となるスパンをフィルターします。 定義元: src/weaveClient.ts:621

パラメーター

オプション
GetAgentSpanStatsOptions

戻り値

Promise<Response<GetAgentSpanStatsResult>>


getAgentTurn()

getAgentTurn(options): Promise<Response<AgentTraceChatRes>>
指定した traceId の単一ターンに関するデータ (メッセージを含む) を取得します。 定義元: src/weaveClient.ts:655

パラメーター

オプション
GetAgentTurnOptions

戻り値

Promise<Response<AgentTraceChatRes>>


getAgentTurns()

getAgentTurns(options): Promise<Response<GetAgentTurnsResult>>
会話 ID を指定して、複数のターンのデータ (メッセージを含む) を取得します。 定義元: src/weaveClient.ts:688

パラメーター

オプション
GetAgentTurnsOptions

戻り値

Promise<Response<GetAgentTurnsResult>>


getAgentVersions()

getAgentVersions(options): Promise<Response<GetAgentVersionsResult>>
指定したエージェントのバージョンを一覧表示します。 定義元: src/weaveClient.ts:522

パラメーター

オプション
GetAgentVersionsOptions

戻り値

Promise<Response<GetAgentVersionsResult>>


getCall()

getCall(callId, includeCosts?): Promise<Call>
定義元: src/weaveClient.ts:902

パラメーター

callId
string
includeCosts?
boolean = false

戻り値

Promise<Call>

getCalls()

Call Signature

getCalls(options?): Promise<Call[]>
定義元: src/weaveClient.ts:935
パラメーター
オプション
GetCallsOptions
戻り値
Promise<Call[]>

Call Signature

getCalls(options?, includeCosts?, limit?): Promise<Call[]>
定義元: src/weaveClient.ts:936
パラメーター
オプション?
CallsFilter
includeCosts?
boolean
limit?
数値
戻り値
Promise<Call[]>

getCallsIterator()

Call Signature

getCallsIterator(options?, includeCosts?, limit?): AsyncIterableIterator<CallSchema>
定義元: src/weaveClient.ts:957
パラメーター
オプション?
CallsFilter
includeCosts?
boolean
limit?
数値
戻り値
AsyncIterableIterator<CallSchema>

Call Signature

getCallsIterator(options?): AsyncIterableIterator<CallSchema>
定義元: src/weaveClient.ts:962
パラメーター
オプション?
GetCallsOptions
戻り値
AsyncIterableIterator<CallSchema>

getCallStack()

getCallStack(): CallStack
定義元: src/weaveClient.ts:1482

戻り値

CallStack

getCurrentAttributes()

getCurrentAttributes(): Record<string, any>
定義元: src/weaveClient.ts:1486

戻り値

Record<string, any>

linkPromptToRegistry()

linkPromptToRegistry(prompt, options): Promise<LinkAssetToRegistryRes>
公開済みの prompt バージョンを Registry ポートフォリオにリンクします。 定義元: src/weaveClient.ts:1181

パラメーター

プロンプト
RegistryLinkable
オプション
LinkPromptToRegistryOptions

戻り値

Promise<LinkAssetToRegistryRes>

publish()

publish(obj, objId?): Promise<ObjectRef>
定義元: src/weaveClient.ts:890

パラメーター

obj
any
objId?
string

戻り値

Promise<ObjectRef>

pushNewCall()

pushNewCall(): object
定義元: src/weaveClient.ts:1490

戻り値

object
currentCall
currentCall: CallStackEntry
newStack
newStack: CallStack
parentCall
optional 親Call: CallStackEntry

runWithAttributes()

runWithAttributes<T>(attributes, fn): T
定義元: src/weaveClient.ts:1498

タイプパラメーター

T
T

パラメーター

属性
Record<string, any>
fn
() => T

戻り値

T

runWithCallStack()

runWithCallStack<T>(callStack, fn): T
定義元: src/weaveClient.ts:1494

タイプパラメーター

T
T

パラメーター

callStack
CallStack
fn
() => T

戻り値

T

saveCallEnd()

saveCallEnd(callEnd): void
定義元: src/weaveClient.ts:1477

パラメーター

callEnd
EndedCallSchemaForInsert

戻り値

void

saveCallStart()

saveCallStart(callStart): void
定義元: src/weaveClient.ts:1472

パラメーター

callStart
StartedCallSchemaForInsert

戻り値

void

saveOp()

saveOp(op, objId?): Promise<OpRef>
定義元: src/weaveClient.ts:1537

パラメーター

op
Op<(…args) => any>
objId?
string

戻り値

Promise<OpRef>

searchAgents()

searchAgents(options): Promise<Response<SearchAgentsResult>>
project 内のエージェントメッセージを全文検索します。一致したメッセージのプレビューを含む結果を、会話ごとにグループ化して返します。 query は全文検索の検索語です。空の文字列を渡すと、テキスト検索を行わずに構造化フィルター (agentNameconversationIdtraceId) に一致するすべてのメッセージを取得します。limit / offset を使用して結果をページネーションします。 定義元: src/weaveClient.ts:730

パラメーター

オプション
SearchAgentsOptions

戻り値

Promise<Response<SearchAgentsResult>>


serializeAudio()

serializeAudio(data, audioType?): Promise<SerializedFileBlob>
生のオーディオバイトを Weave コンテンツストアにアップロードし、Call の出力に埋め込み可能な CustomWeaveType プレースホルダーを返します。 finishCall の自動シリアル化パイプラインを使用せずに、saveCallEnd 経由などで Call の出力を手動で構築する場合に使用します。 定義元: src/weaveClient.ts:1424

パラメーター

data
Buffer 生のオーディオバイト (ブラウザとの互換性を最大限確保するには WAV)
audioType?
"wav" = DEFAULT_AUDIO_TYPE file 形式 — 現在サポートされているのは「wav」のみです

戻り値

Promise<SerializedFileBlob>

updateCall()

updateCall(callId, displayName): Promise<void>
定義元: src/weaveClient.ts:1710

パラメーター

callId
string
displayName
string

戻り値

Promise<void>

waitForBatchProcessing()

waitForBatchProcessing(): Promise<void>
定義元: src/weaveClient.ts:801

戻り値

Promise<void>