xintongsong commented on code in PR #107:
URL: https://github.com/apache/flink-agents/pull/107#discussion_r2324135348
##########
python/flink_agents/api/chat_models/chat_model.py:
##########
@@ -60,3 +65,20 @@ def chat(self, messages: Sequence[ChatMessage]) ->
ChatMessage:
ChatMessage
Response from the ChatModel.
"""
+
+ @abstractmethod
+ def convert_tool_to_model_format(self, tool_metadata: ToolMetadata) ->
Dict[str, Any]:
Review Comment:
We just pass the available tools into `chat()`, and the model implementation
will do the conversion. E.g., `OllamaChatModel` does the conversion in its
`chat()` method, and `AnthropicChatModel` (PR #139) does it with a method
`to_anthropic_tool()` which is also called in `chat()`.
At the moment, I don't see any need for calling
`convert_tool_to_model_format` from outside of the chat model. So let's leave
it to the model implementation for now, rather than introducing a common
abstract method.
--
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]