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
[BUG] Failures in Vertex AI Gemini calls due to unsupported @SystemMessage #757
Comments
Hi @ddobrin, system and user messages are very different in nature. This exception is thrown to let the developer aware that system messages are not supported by this model, so he should avoid using them. I would avoid silently converting one to another. |
Hello, thank you for the quick reply. The distinction between the 2 is understood, certainly. The rationale for opening this issue comes down to the fact that developers would have to change their code when testing with different models, or when building tests using Testcontainers and testing different models, which could lead to a diminished UX |
@ddobrin good point! |
cc @glaforge I plan to fix this today |
@UserMessage
is supported and can be used with VertexAiGeminiChatModel@SystemMessage
is not supported for Vertex.Behaviour: call fails and indicates the reason for the failure as SystemMessage not being supported in Vertex.
Suggestion:
As all
ChatMessage
implementation will be send to the model via Vertex, suggest converting, transparent to the developer, the @SystemMessage to a @Usermessage.Future:
Code will remain unchanged for a developer if Vertex adds support for @SystemMessage and Langchain4J updates the codebase.
The text was updated successfully, but these errors were encountered: