This is an automated email from the ASF dual-hosted git repository.
xtsong pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/flink-agents.git
from 25ea18f [integration][python] Anthropic Chat Model APIs Integration
(#139)
new 95c1f9c [hotfix] Align class, parameter and decorator name of chat
model abstraction.
new 6847575 [hotfix] Use re rather than Formatter to format Prompt to
support json schema in prompt.
new bcf8f0b [runtime][python] Refactor built-in actions to execute tool
calls from one response one time.
new 300d052 [api][plan][runtime] Support register resources in execution
envrionment.
new dd65ab0 [api][plan][runtime] Support pass additional parameters to
action.
new e9b5654 [api][python] Introduce built-in ReAct Agent.
The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../flink/agents/api/resource/ResourceType.java | 2 +
.../java/org/apache/flink/agents/plan/Action.java | 16 +-
.../plan/serializer/ActionJsonDeserializer.java | 29 ++-
.../plan/serializer/ActionJsonSerializer.java | 20 ++
python/flink_agents/api/agent.py | 107 ++++----
python/flink_agents/api/{ => agents}/__init__.py | 0
python/flink_agents/api/agents/react_agent.py | 278 +++++++++++++++++++++
.../api/{ => agents/tests}/__init__.py | 0
.../agents/tests/test_row_schema.py} | 31 +--
python/flink_agents/api/decorators.py | 12 +-
python/flink_agents/api/events/chat_event.py | 7 +-
python/flink_agents/api/events/tool_event.py | 35 +--
python/flink_agents/api/execution_environment.py | 116 ++++++++-
python/flink_agents/api/prompts/prompt.py | 12 +-
python/flink_agents/api/prompts/utils.py | 33 +--
python/flink_agents/api/runner_context.py | 26 ++
python/flink_agents/api/tests/test_prompt.py | 10 +-
python/flink_agents/examples/chat_model_example.py | 44 ++--
.../prompts/utils.py => examples/common_tools.py} | 45 ++--
.../integrate_table_with_react_agent_example.py | 136 ++++++++++
.../flink_agents/examples/react_agent_example.py | 88 +++++++
python/flink_agents/plan/actions/action.py | 43 +++-
.../flink_agents/plan/actions/chat_model_action.py | 181 ++++++++++----
.../flink_agents/plan/actions/tool_call_action.py | 25 +-
python/flink_agents/plan/agent_plan.py | 49 +++-
.../python_agent_plan_compatibility_test_agent.py | 4 +-
.../flink_agents/plan/tests/resources/action.json | 23 +-
.../plan/tests/resources/agent_plan.json | 12 +-
python/flink_agents/plan/tests/test_action.py | 12 +-
python/flink_agents/plan/tests/test_agent_plan.py | 6 +-
.../flink_agents/runtime/flink_runner_context.py | 14 ++
.../runtime/local_execution_environment.py | 4 +
python/flink_agents/runtime/local_runner.py | 18 +-
.../runtime/remote_execution_environment.py | 17 +-
.../runtime/tests/test_built_in_actions.py | 8 +-
.../runtime/tests/test_get_resource_in_action.py | 4 +-
.../agents/runtime/context/RunnerContextImpl.java | 4 +
37 files changed, 1236 insertions(+), 235 deletions(-)
copy python/flink_agents/api/{ => agents}/__init__.py (100%)
create mode 100644 python/flink_agents/api/agents/react_agent.py
copy python/flink_agents/api/{ => agents/tests}/__init__.py (100%)
copy
python/flink_agents/{integrations/chat_models/tests/start_ollama_server.sh =>
api/agents/tests/test_row_schema.py} (66%)
copy python/flink_agents/{api/prompts/utils.py => examples/common_tools.py}
(63%)
create mode 100644
python/flink_agents/examples/integrate_table_with_react_agent_example.py
create mode 100644 python/flink_agents/examples/react_agent_example.py