GreatEugenius commented on code in PR #314:
URL: https://github.com/apache/flink-agents/pull/314#discussion_r2540281002
##########
api/src/main/java/org/apache/flink/agents/api/prompt/Prompt.java:
##########
@@ -76,6 +77,14 @@ public String formatString(Map<String, String> kwargs) {
});
}
+ public List<ChatMessage> formatMessages(String defaultRoleValue,
Map<String, Object> kwargs) {
Review Comment:
The problem was a type mismatch between:
ChatMessage.extra_args which is typed as Dict[str, Any] (equivalent to
Map<String, Object> in Java)
Prompt.format_messages() method signature which expects **kwargs: str
(equivalent to Map<String, String> in Java)
When we directly passed msg.extra_args to format_messages(**input_variable),
we were essentially trying to pass Any typed values where str types were
expected, causing the type inconsistency.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]