Pass conversation ID to AI task

Is there a way to pass a previous conversation ID to a second AI task? I couldn’t find any mention of if in the documentation. Conversation ID was only mentioned as being a part of the response variable.

I am interested in creating a script that continues on with the same conversation.

Hey mods, this has nothing to do with the voice assistant. I’m talking about the automation action ai_task.

You should be able to use a conversation agent not ai task - Ai task doesn’t get a conversation I’d…therefore no passing context. I believe it works regardless of a voice assistant or not… That’s how the concierge Friday script works in fridays party. I basically get two LLMs to have a chat… :slight_smile:

Can you pass attachments to the conversation agent? I thought this was the whole purpose of the new ai_task integration.

I just don’t understand why the result objects hand back a conversation_id property of it’s not able to get used anywhere.

During the dialogue, you or LLM can call a script (in a simpler version, this can be voice automation) that processes attachments in some way, and the result of the processing will be entered into the conversation log.

But if you need to transfer data from outside into an existing conversation, this is problematic, since conversation_id is only present in the debug information.

Although it works if you manually copy the id and then run an action with it. But it’s hard for me to think of use cases for this, considering that conversation ids are constantly reset on the satellite.

If you really need this feature, create a request, and maybe the developers will add an event that will contain this data.

1 Like

That’s a good idea. I will suggest this feature. I have to believe that’s what was in the plan because otherwise, what’s the point of handing back the conversation_id?

If anyone cares, I’m trying to write a script that performs two (or more) separate tasks on an arbitrary video from my doorbell. If I can’t reference the same conversation, then I would have to end up uploading the video to the LLM as many times as there are tasks to perform, which just seems wasteful.

Could you describe your task in more detail so that I can understand the problem you are trying to solve?
After executing AI_task, your answer will be stored in a variable within the script, which you can use multiple times.

I am uploading a relatively large attachment in order to establish a context for what I am requesting of the LLM. I want to request follow-up tasks based on the answers given by the LLM. I want to maintain the context established in the original request so that uploading the attachment for each one is not necessary.

FYI, I started a discussion on the github page:

1 Like

It’s the ‘suck in OpenAPI doc for service X’ context scenario, basically?

Can’t say I’m familiar with that. I just want to make multipe ai_task calls that can all use the attachments that I’ve already provided.

After briefly checking out the code, I can tell you that there’s no info about attached data in the history. The system uses either temporary files or paths when sending data to LLM for processing.
Therefore, even if you have access to the ID, you will not be able to access the original video, only the system prompt, your instructions, and the response.
So it’s normal to call this action several times, specifying the path to the source video each time — this is the only way to work with media. New context can be added to the new action instruction via the response variable.
If we are dealing with text data, we can upload it to the chatlog via conversation.process, but this won’t work with video or photo.

1 Like

I’m not sure what you mean. I, as the user, do not need to access that video file again. I still have it from where I uploaded it first. I just don’t want to have to upload it to the cloud (or wherever it’s going) a second time to ask a follow-up question about the same content.

Are we talking about the same thing?

Like when I use Gemini, I can drop in a file and then that file becomes part of the context for the conversation and I can ask multiple questions about it. I had assumed that the conversation_id was just a way to associate multiple tasks to the same context.

Have I been thinking about this incorrectly the whole time?

ai_task does not convert your video into an embedding attached to a conversation; it is a one-time request to LLM, the result of which is a text response.

2 Likes