-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Description
Bug Description:
This seems to be a regression in Theia 1.60, introduced with #15092 (see below).
Since upgrading to Theia 1.60, every request to ollama (in the code, every call to OllamaModel.request fails with the error Cannot read properties of undefined (reading 'createMessageContent')
Steps to Reproduce:
- Start Theia IDE or a Theia application that includes the AI modules.
- Enable AI, Configure ollama (note: this does not even need a local ollama server running to reproduce), configure the chat naming agent and the Orchestrator agent to use an ollama model.
- Open AI Chat and enter any message.
Expected behavior:
The chat agent answers the message.
Actual behavior:
The chat view reports the error:
Cannot read properties of undefined (reading 'createMessageContent')
Additional Information
- Operating System: MacOS, Arm64 (M1 MacBook)
- Theia Version: Theia IDE 1.60.200
Anaylsis:
In the line
| messages: request.messages.map(this.toOllamaMessage).filter(m => m !== undefined) as Message[], |
and the following line, we pass methods to the map() function which causes this to be unbound when the methods are called.
This was like this already in previous versions, but only since #15092, this is referenced within toOllamaMessage() which introduces the bug.
sj14, andreyplus and Vadim-Zenin
Metadata
Metadata
Assignees
Labels
No labels