alnzng opened a new pull request, #139: URL: https://github.com/apache/flink-agents/pull/139
<!-- * Thank you very much for contributing to Flink Agents. * Please add the relevant components in the PR title. E.g., [api], [runtime], [java], [python], [hotfix], etc. --> <!-- Please link the PR to the relevant issue(s). Hotfix doesn't need this. --> Linked issue: #129 ### Purpose of change <!-- What is the purpose of this change? --> Integrate Anthropic Chat Model APIs. ### Tests Unit tests, also use `chat_model_example` as template to verify the Anthropic APIs. ``` 2025-09-02 11:37:31,357 - INFO - HTTP Request: POST https://api.anthropic.com/v1/messages "HTTP/1.1 200 OK" 2025-09-02 11:37:31,359 - INFO - key: 0002, send_event: id=UUID('5445c578-d209-4520-b0d1-ec9b44667df1') request=ChatRequestEvent(id=UUID('3f708c50-7d06-4326-ab54-b58091be8b3b'), model='creative_chat_model', messages=[ChatMessage(role=<MessageRole.USER: 'user'>, content='Tell me a joke about cats.', tool_calls=[], extra_args={})]) response=ChatMessage(role=<MessageRole.ASSISTANT: 'assistant'>, content="Why don't cats play poker in the jungle?\n\nToo many cheetahs! 🐱", tool_calls=[], extra_args={}) 2025-09-02 11:37:31,360 - INFO - key: 0002, performing action: process_chat_response 2025-09-02 11:37:31,360 - INFO - key: 0002, send_event: id=UUID('6c29e9dc-f5e7-4602-84ce-44e2d0f6686c') output="Why don't cats play poker in the jungle?\n\nToo many cheetahs! 🐱" 0001: The sum of 1 and 2 is 3. 0002: Why don't cats play poker in the jungle? Too many cheetahs! 🐱 ``` ### API - ToolRequestEvent: Added optional external_id field for storing original tool call IDs from external systems (e.g., Anthropic tool_use_id) - ChatMessage: Extended content field to support both str and List[Any] types, enabling LLM providers to pass native content formats while maintaining backward compatibility ### Documentation <!-- Should this change be covered by the user documentation?--> n/a -- 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]
