From f522f5bbc60770e1441ae269c7b83cc0722ae299 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Fri, 25 Apr 2025 13:03:39 -0700 Subject: [PATCH] AIX: export image dereferencing & inlining --- src/modules/aix/client/aix.client.chatGenerateRequest.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/aix/client/aix.client.chatGenerateRequest.ts b/src/modules/aix/client/aix.client.chatGenerateRequest.ts index 8257e9d89..9937c3fb5 100644 --- a/src/modules/aix/client/aix.client.chatGenerateRequest.ts +++ b/src/modules/aix/client/aix.client.chatGenerateRequest.ts @@ -138,7 +138,7 @@ export async function aixCGR_ChatSequence_FromDMessagesOrThrow( case 'image_ref': // note, we don't resize, as the user image is resized following the user's preferences - uMsg.parts.push(await _convertImageRefToInlineImageOrThrow(uFragment.part, false)); + uMsg.parts.push(await aixConvertImageRefToInlineImageOrThrow(uFragment.part, false)); break; case 'doc': @@ -223,7 +223,7 @@ export async function aixCGR_ChatSequence_FromDMessagesOrThrow( */ const isLastAssistantMessage = _index === lastAssistantMessageIndex; const resizeMode = isLastAssistantMessage ? false : 'openai-low-res'; - modelMessage.parts.push(await _convertImageRefToInlineImageOrThrow(aFragment.part, resizeMode)); + modelMessage.parts.push(await aixConvertImageRefToInlineImageOrThrow(aFragment.part, resizeMode)); break; case 'tool_response': @@ -291,7 +291,7 @@ export async function aixCGR_ChatSequence_FromDMessagesOrThrow( /// Parts that differ from DMessage*Part to AIX -async function _convertImageRefToInlineImageOrThrow(imageRefPart: DMessageImageRefPart, resizeMode: LLMImageResizeMode | false): Promise { +export async function aixConvertImageRefToInlineImageOrThrow(imageRefPart: DMessageImageRefPart, resizeMode: LLMImageResizeMode | false): Promise { // validate const { dataRef } = imageRefPart;