Invoke another assistant from my real-time client function

How can I invoke another assistant from my real-time client function and ensure the response is played back in real-time?

For example:

client.addTool(
  {
    name: "get_weather",
    description: "Retrieves the weather for a given latitude and longitude. Specify a label for the location.",
    parameters: {
      type: "object",
      properties: {
       assistant_id: {
          type: "string",
          description: "The unique ID of the Weather assistant.",
          default: "x",
        },
        lat: {
          type: "number",
          description: "Latitude",
        },
        lng: {
          type: "number",
          description: "Longitude",
        },
        location: {
          type: "string",
          description: "Name of the location",
        },
      },
      required: ["lat", "lng", "location"],
    },
  },
  async ({assistant_id, lat, lng, location }) => {
    const response = await invokeAssistant({
      assistant_id: assistant_id,
      lat: lat,
      lng: lng,
      location: location,
    });
    return response;
  }
);

I want the response from the invoked assistant to be streamed back and processed, so it can be played back in real-time

Hi,

Struggling a bit on understanding what you’re asking here.

Would you mind sharing a workflow of what you’re trying to achieve?

Something like « user does that and then ai says that and runs that and says that »

Just so I can try to help you out