-
Notifications
You must be signed in to change notification settings - Fork 28
Add get_sly_data() to ToolCaller interface #745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,6 +79,13 @@ def get_inspector(self) -> AgentNetworkInspector: | |
| # For now, our inspector is an AgentToolFactory | ||
| return self.factory | ||
|
|
||
| def get_sly_data(self) -> Dict[str, Any]: | ||
| """ | ||
| :return: A mapping whose keys might be referenceable by agents, but whose | ||
| values should not appear in agent chat text. Can be an empty dictionary. | ||
| """ | ||
| return self.sly_data | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add get_sly_data() implementation. |
||
|
|
||
| def get_origin(self) -> List[Dict[str, Any]]: | ||
| """ | ||
| :return: A List of origin dictionaries indicating the origin of the run. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,3 +54,10 @@ def get_name(self) -> str: | |
| :return: the name of the data-driven agent as it comes from the spec | ||
| """ | ||
| raise NotImplementedError | ||
|
|
||
| def get_sly_data(self) -> Dict[str, Any]: | ||
| """ | ||
| :return: A mapping whose keys might be referenceable by agents, but whose | ||
| values should not appear in agent chat text. Can be an empty dictionary. | ||
| """ | ||
| raise NotImplementedError | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add get_sly_data() method to ToolCaller interface |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -154,7 +154,7 @@ async def create_mcp_tool(self, mcp_info: Union[str, Dict[str, Any]]) -> List[Ba | |
| # By default, assume no allowed tools. This may get updated below or in the LangChainMcpAdadter. | ||
| allowed_tools: List[str] = None | ||
| # Get HTTP headers from sly_data if available | ||
| http_headers: Dict[str, Any] = self.tool_caller.sly_data.get("http_headers", {}) | ||
| http_headers: Dict[str, Any] = self.tool_caller.get_sly_data().get("http_headers", {}) | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use get_sly_data() method instead of assuming a member on an interface. |
||
|
|
||
| if isinstance(mcp_info, str): | ||
| server_url: str = mcp_info | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ else | |
| fi | ||
|
|
||
| echo "Activating virtual environment..." | ||
| # shellcheck disable=SC1091 | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixes to shellcheck - why didn't these show up before? |
||
| source "$VENV_DIR/bin/activate" | ||
| echo "✅ Virtual environment activated" | ||
| echo "" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix pymarkdownlint - why didn't this show up before?