diff --git a/src/models/janus/processing_janus.js b/src/models/janus/processing_janus.js index 10d28f98d..434192e18 100644 --- a/src/models/janus/processing_janus.js +++ b/src/models/janus/processing_janus.js @@ -21,11 +21,17 @@ export class VLChatProcessor extends Processor { } /** - * @param {*} conversation - * @param {Object} options - * @param {RawImage|RawImage[]} [options.images] - * @param {string} [options.chat_template="default"] - * @returns + * @typedef {Object} MultimodalMessageProperties Additional properties for multimodal messages. + * @property {(RawImage | string | URL)[]} [images] The images in the message. + * @typedef {(import('../../tokenizers.js').Message & MultimodalMessageProperties)[]} MultimodalConversation The conversation possibly containing multimodal inputs. + */ + + /** + * @param {MultimodalConversation} conversation The chat messages to process. + * @param {Object} options Additional options for processing. + * @param {RawImage|RawImage[]} [options.images] The images to process, if not set in the conversation. + * @param {string} [options.chat_template="default"] The chat template to use. + * @returns {Promise<{input_ids: Tensor; attention_mask: Tensor; images_seq_mask: Tensor; images_emb_mask: Tensor;} & import('../../base/image_processors_utils.js').ImageProcessorResult>} The processed input. */ async _call(conversation, { images = null,