WolframResearch / Chatbook

Wolfram Notebooks + LLMs
MIT License
73 stars 8 forks source link

`CellToChatMessage` fails when `$multimodalMessages` is true #711

Closed rhennigan closed 3 weeks ago

rhennigan commented 3 weeks ago

The following generates an internal failure:

Wolfram`Chatbook`ChatMessages`$multimodalMessages = True;

CellToChatMessage[NotebookRead[EvaluationCell[]]]

image

Debug Data | Property | Value | | --- | --- | | Name | ``"Wolfram/Chatbook"`` | | Version | ``"1.4.6"`` | | ReleaseID | ``"$RELEASE_ID$"`` | | EvaluationEnvironment | ``"Session"`` | | FrontEndVersion | ``"Desktop: 14.0 for Microsoft Windows (64-bit) (December 12, 2023)"`` | | KernelVersion | ``"14.0.0 for Microsoft Windows (64-bit) (December 13, 2023)"`` | | SystemID | ``"Windows-x86-64"`` | | Notebooks | ``True`` | | DynamicEvaluation | ``False`` | | SynchronousEvaluation | ``False`` | | TaskEvaluation | ``False`` | ## Settings | Property | Value | | --- | --- | | StyleSheetVersion | ``"1.4.6.3924158197"`` | ## Stack Data ``` CellToChatMessage catchTop setServiceCaller CellToChatMessage catchTop makeCurrentCellMessage makeMessageContent allowedMultimodalRoles allowedMultimodalRoles0 toModelName throwInternalFailure ``` ## Failure Data ``` <| "Evaluation" :> Wolfram`Chatbook`Models`toModelName[Missing["KeyAbsent", "Model"]] "Arguments" -> {} "Stack" :> Wolfram`Chatbook`Common`Private`$stack$10605 |> ```