@@ -15,15 +15,15 @@ import { tracer } from "./tracer.js";
1515 * @property {Function } get - Get a specific key from the current run's metadata.
1616 * @property {Function } set - Set a key in the current run's metadata.
1717 * @property {Function } del - Delete a key from the current run's metadata.
18- * @property {Function } update - Update the entire metadata object for the current run.
18+ * @property {Function } save - Update the entire metadata object for the current run.
1919 */
2020
2121export const metadata = {
2222 current : currentMetadata ,
2323 get : getMetadataKey ,
2424 set : setMetadataKey ,
2525 del : deleteMetadataKey ,
26- update : updateMetadata ,
26+ save : saveMetadata ,
2727} ;
2828
2929export type RunMetadata = Record < string , DeserializedJson > ;
@@ -142,16 +142,16 @@ async function deleteMetadataKey(key: string, requestOptions?: ApiRequestOptions
142142 * @returns {Promise<void> } A promise that resolves when the metadata is updated.
143143 *
144144 * @example
145- * await metadata.update ({ progress: 0.6, user: { name: "Alice", id: "user_5678" } });
145+ * await metadata.save ({ progress: 0.6, user: { name: "Alice", id: "user_5678" } });
146146 */
147- async function updateMetadata (
147+ async function saveMetadata (
148148 metadata : RunMetadata ,
149149 requestOptions ?: ApiRequestOptions
150150) : Promise < void > {
151151 const $requestOptions = mergeRequestOptions (
152152 {
153153 tracer,
154- name : "metadata.update ()" ,
154+ name : "metadata.save ()" ,
155155 icon : "code-plus" ,
156156 attributes : {
157157 ...flattenAttributes ( metadata ) ,
0 commit comments