NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

[Feature Request]: Improve Concatenated Send Messages Logic

Open H0llyW00dzZ opened this issue 11 months ago • 2 comments

Problem Description

The current concatenated send messages logic has an issue. It only works consistently for OpenAI, but when using another provider such as Anthropic (Claude), it does not work consistently.

image

Solution Description

If possible, it would be better to improve the logic and make it more structured. The suggested approach is:

  1. If there is no system role, make the user role the first one.
  2. If there is a system role, make the user role the second one.

This improvement would ensure consistent behavior across different providers and a more structured approach to handling concatenated messages.

Alternatives Considered

No response

Additional Context

No response

H0llyW00dzZ avatar Mar 14 '24 09:03 H0llyW00dzZ

[!NOTE] This improvement is a better approach. Basically, we don't expect to heavily utilize the OpenAI service provider when using models that are not available on OpenAI.

H0llyW00dzZ avatar Mar 14 '24 12:03 H0llyW00dzZ

Note

This improvement is a better approach. Basically, we don't expect to heavily utilize the OpenAI service provider when using models that are not available on OpenAI. 这个问题,我已经解决,出现这个原因是,请求的时候user的格式不一致导致的,专门写了一个转换函数可以在openai和Anthropic (Claude)之间互相转换格式,这样就不会出现错误了,这个错误,只出现在视觉这块

laxfer avatar Mar 21 '24 01:03 laxfer