ai icon indicating copy to clipboard operation
ai copied to clipboard

Metadata with assistants

Open nkeat12 opened this issue 1 year ago • 4 comments

Description

is there a way to send metadata when using experimental_AssistantResponse? I saw it was added with sendExtraMessageFields..

Code example

No response

Additional context

No response

nkeat12 avatar Feb 27 '24 00:02 nkeat12

You can use sendDataMessage to send any data from the assistant response to the client.

lgrammel avatar Mar 15 '24 13:03 lgrammel

Hey, I have the same question, and I don't quite understand how I could append the metadata to the sendDataMessage function based on the documentation example. It creates a new message, where what I was looking for is the message object to include the metadata that comes from the openai response.

Should I fetch the message again from openai?

justkahdri avatar Apr 18 '24 13:04 justkahdri

Did a small PR to solve this, LMK if it's useful :pray:

justkahdri avatar Apr 18 '24 16:04 justkahdri

@lgrammel did you have the chance to review this? It's blocking our team, and it'd be awesome to know if you'll add this

justkahdri avatar Apr 29 '24 16:04 justkahdri