miurla / morphic

An AI-powered search engine with a generative UI
https://morphic.sh
Apache License 2.0
5.06k stars 1.18k forks source link

messages with role 'tool' must be a response to a preceeding message with 'tool_calls' #136

Closed superlbr closed 2 months ago

superlbr commented 2 months ago

in researcher.tsx {"error":{"message":"Invalid parameter: messages with role 'tool' must be a response to a preceeding message with 'tool_calls'. (request id: 2024051116100984850589317176109) (request id: 2024051116100973706982837582869) (request id: 202405111610097110056956WoKcYSs) (request id: 20240511161006903012458ab9obA9U)","type":"invalid_request_error","param":"messages.[3].role","code":null}}

miurla commented 2 months ago

This error occurs when it’s not properly called by the tool. Are you experiencing this without making any changes to the code? Please describe the steps to reproduce.

superlbr commented 2 months ago

use model gpt-4 is ok. gpt-4-turbo sometimes error. just add images and answers in research choose a gpt model with version is better