Skip to content

Conversation

@Ahoo-Wang
Copy link
Contributor

  • First position of prompt to insert system message
  • Prioritize system messages in conversation history

- First position of prompt to insert system message
- Prioritize system messages in conversation history

Signed-off-by: Ahoo Wang <[email protected]>
- Replace stream-based instruction processing with a for loop
- Improve readability and performance by avoiding unnecessary stream operations

Signed-off-by: Ahoo Wang <[email protected]>
List<Message> processedMessages = new ArrayList<>(memoryMessages);
processedMessages.addAll(chatClientRequest.prompt().getInstructions());

List<Message> processedMessages = new ArrayList<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why put system in the first place? In my opinion, system indicates LLMS, and all subsequent conversations are based on system.

And from https://openai.com/index/gpt-4-api-general-availability/, system and user message do not have the same function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants