Improve type definition of Message object (#1525)
Message is defined as an object with a role and content, both of which are strings. But there are
examples throughout the codebase, when using a vision model, showing that you can pass an array of
objects with a type property of "string" or "image" and a text property that is a string.
This expands the JSDoc typedef of Message to cover both cases.
* extended Messages and typed TextGenerationPipeline messages
* added Translation
* added Open-Ended Unions for autocomplete
* removed source_lang_code and target_lang_code
* fixed jsdoc generation
* remove translategemma properties
Co-authored-by: Joshua Lochner <admin@xenova.com>
---------
Co-authored-by: Nico Martin <mail@nico.dev>
Co-authored-by: Joshua Lochner <admin@xenova.com>