Modify display names, add feedback, and delete Calls in Weave
This page describes how to modify Calls in Weave after they’ve been created. Most Call properties are immutable after creation, but Weave supports the following mutations:
import weave# Initialize the clientclient = weave.init("your-project-name")# Get a specific Call by its IDcall = client.get_call("call-uuid-here")# Set the display name of the Callcall.set_display_name("My Custom Display Name")
To set the display name of a Call, use client.updateCall to update by call ID directly:
import * asweave from 'weave'// Initialize the clientconstclient = awaitweave.init('your-project-name')// Update the display name of a Call by its IDawaitclient.updateCall('call-uuid-here', 'My Custom Display Name')
To set the display name of a Call using the Service API, make a request to the /call/update endpoint.
To delete a Call using the Python API, use the Call.delete method.
import weave# Initialize the clientclient = weave.init("your-project-name")# Get a specific Call by its IDcall = client.get_call("call-uuid-here")# Delete the Callcall.delete()
This feature is not available in the TypeScript SDK yet.
To delete a Call using the Service API, make a request to the /calls/delete endpoint.
To delete batches of Calls using the Python API, pass a list of Call IDs to delete_calls().
You can delete a maximum of 1000 Calls at a time.
Deleting a Call also deletes all of its children.
import weave# Initialize the clientclient = weave.init("my-project")# Get all Calls from clientall_calls = client.get_calls()# Get list of first 1000 Call objectsfirst_1000_calls = all_calls[:1000]# Get list of first 1000 Call IDsfirst_1000_calls_ids = [c.id for c in first_1000_calls]# Delete first 1000 Calls by IDclient.delete_calls(call_ids=first_1000_calls_ids)
This feature is not available in the TypeScript SDK yet.