Enhancement: Correctly handle messages with role other than "assistant"
in conversation history.
#4898
Unanswered
bendavis78
asked this question in
Troubleshooting
Replies: 1 comment
-
these would be retained when using Agents, will link to their docs when they are published momentarily. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on a custom endpoint that mimics OpenAI's completions api. This endpoint uses function calling, so any messages that include the function call results will have
role="tool"
. I want to maintain these function result messages in the conversation state (ie themessages
array sent to server on each request) so that the function call information is kept in context.Consider the following message history:
Currently when LibreChat encounters the
role="tool"
message from the server, it assumes it is arole="assistant"
message, and concatenates it with any following messages. The message state sent back to the server will combine the last two messages into a single system message. This loses conversation context.It would be useful if the UI should only show messages if the
role
is set to "assistant". All other messages should be stored in the conversation history with its original attributes retained. This would allow the client to send the full history to the server and keep everything in context.One might argue that you don't need to retain the tool response in the context, but I think that decision should be on the server side.
Components:
General, UI
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions