Skip to content

Add support for OpenAI Developer message #3089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

andresssantos
Copy link
Contributor

@andresssantos andresssantos commented May 10, 2025

  • Included DEVELOPER in the MessageType enum
  • Created DeveloperMessage class with constructors, copy(), mutate(), and builder methods
  • Updated AbstractMessage constructor to accept DEVELOPER messages without validation errors
  • Updated ChatModel and ChatClient methods to support DEVELOPER message type
  • Developed unit tests for DeveloperMessage, validating exception cases and proper inclusion in prompts

…s, and tests

- Included DEVELOPER in the MessageType enum with value "developer"
- Updated AbstractMessage constructor to accept DEVELOPER messages without validation errors
- Created DeveloperMessage class with constructors, copy(), mutate(), and builder methods
- Added validation to ensure textContent is not null or empty when creating DeveloperMessage
- Modified message creation methods (e.g., Neo4jChatMemoryRepositoryIT) to handle MessageType.DEVELOPER
- Updated ChatModel and ChatClient methods to support DEVELOPER message type
- Developed unit tests for DeveloperMessage, validating exception cases and proper inclusion in prompts
- Adjusted existing SystemMessage validation tests to include DEVELOPER for consistency

Signed-off-by: Andres da Silva Santos <40636137+andresssantos@users.noreply.github.com>
Signed-off-by: Andres da Silva Santos <40636137+andresssantos@users.noreply.github.com>
Signed-off-by: Andres da Silva Santos <40636137+andresssantos@users.noreply.github.com>
@dev-jonghoonpark
Copy link
Contributor

related pr : #2864

@andresssantos andresssantos changed the title Chatclient developer message Add support for OpenAI Developer message May 11, 2025
@markpollack
Copy link
Member

hi folks. I do appreciate the PR, but I made a mistake in my comments on the other related one, saying that was incomplete. This PR adds non portable 'developer' fluent api methods to the portable chatclient interface and that goes against the portability design idea. These issues require more up front design as they touch large areas of the code.

This issue as well as other would be addressed by a 'capability' feature, see #3103 so that can have more information on how to make correct adaptations to various features for specific models. Likely this will live in a sort of options like manner, but again, needs desgin.

I'm going to leave this PR open now under 'to discuss` and move it to the post GA time frame. I really love the capabilities (ha ha - no pun intended) of the reasoning models and want to get support for them in a a priority after GA. Too bad it didn't work out before GA.

@markpollack markpollack added this to the 1.0.x milestone May 11, 2025
@andresssantos
Copy link
Contributor Author

Thank you for your feedback @markpollack. I agree that implementing a more general solution, such as a "capability" feature, makes more sense in the long run.

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.

3 participants