fix(ai): use valid synthetic Responses message ids closes #5148
This commit is contained in:
@@ -178,7 +178,7 @@ export function convertResponsesMessages<TApi extends Api>(
|
||||
const textBlock = block as TextContent;
|
||||
const parsedSignature = parseTextSignature(textBlock.textSignature);
|
||||
const fallbackMessageId =
|
||||
textBlockIndex === 0 ? `pi_msg_${msgIndex}` : `pi_msg_${msgIndex}_${textBlockIndex}`;
|
||||
textBlockIndex === 0 ? `msg_pi_${msgIndex}` : `msg_pi_${msgIndex}_${textBlockIndex}`;
|
||||
textBlockIndex++;
|
||||
// OpenAI requires id to be max 64 characters
|
||||
let msgId = parsedSignature?.id;
|
||||
|
||||
Reference in New Issue
Block a user