xintongsong commented on code in PR #81:
URL: https://github.com/apache/flink-agents/pull/81#discussion_r2250920806
##########
python/flink_agents/plan/resource_provider.py:
##########
@@ -81,11 +88,12 @@ class PythonResourceProvider(ResourceProvider):
clazz: str
kwargs: Dict[str, Any]
- def provide(self) -> Resource:
+ def provide(self, fetcher: Callable) -> Resource:
Review Comment:
```suggestion
def provide(self, get_resource: Callable) -> Resource:
```
##########
python/flink_agents/runtime/tests/test_built_in_actions.py:
##########
@@ -0,0 +1,171 @@
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#################################################################################
+import uuid
+from typing import Any, Dict, List, Optional, Sequence, Tuple, Type
+
+from flink_agents.api.agent import Agent
+from flink_agents.api.chat_message import ChatMessage, MessageRole
+from flink_agents.api.chat_models.chat_model import BaseChatModel
+from flink_agents.api.decorators import action, chat_model, prompt, tool
+from flink_agents.api.events.chat_event import ChatRequestEvent,
ChatResponseEvent
+from flink_agents.api.events.event import (
+ InputEvent,
+ OutputEvent,
+)
+from flink_agents.api.execution_environment import AgentsExecutionEnvironment
+from flink_agents.api.prompts.prompt import Prompt
+from flink_agents.api.resource import ResourceType
+from flink_agents.api.runner_context import RunnerContext
+from flink_agents.api.tools.tool import BaseTool, ToolMetadata, ToolType
+
+
+class MockChatModel(BaseChatModel):
+ """Mock ChatModel for testing integrating prompt and tool."""
+
+ __tools: List[ToolMetadata]
+
+ def __init__(self, /, **kwargs: Any) -> None:
+ """Init method of MockChatModel."""
+ super().__init__(**kwargs)
+ # bind tools
+ if self.tools is not None:
+ self.bind_tools(
Review Comment:
Why do we still need `bind_tools` in `BaseChatModel`?
--
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]