Skip to content

Comments

Add get_sly_data() to ToolCaller interface#745

Merged
d1donlydfink merged 3 commits intomainfrom
DEF-tool-caller-sly-data
Feb 21, 2026
Merged

Add get_sly_data() to ToolCaller interface#745
d1donlydfink merged 3 commits intomainfrom
DEF-tool-caller-sly-data

Conversation

@d1donlydfink
Copy link
Collaborator

@d1donlydfink d1donlydfink commented Feb 20, 2026

  • Add a get_sly_data() method to the ToolCaller interface
  • Have AbstractCallableActivation implement it
  • Have a couple of places in LangChainRunContext and BaseToolFactory use the method instead of assuming a member
  • Fix markdown in README (dunno why this wasn't caught before)
  • Fix spellcheck stuff in quick-start

: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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add get_sly_data() implementation.

: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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add get_sly_data() method to ToolCaller interface

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", {})
Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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.

- **macOS/Linux:** `./quick-start/start-server.sh`
- **Windows:** `quick-start\start-server.bat`
* **macOS/Linux:** `./quick-start/start-server.sh`
* **Windows:** `quick-start\start-server.bat`
Copy link
Collaborator Author

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?

fi

echo "Activating virtual environment..."
# shellcheck disable=SC1091
Copy link
Collaborator Author

@d1donlydfink d1donlydfink Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes to shellcheck - why didn't these show up before?

@d1donlydfink d1donlydfink requested a review from Noravee February 20, 2026 23:35
Copy link
Collaborator

@Noravee Noravee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@d1donlydfink d1donlydfink merged commit b0aadbe into main Feb 21, 2026
3 checks passed
@d1donlydfink d1donlydfink deleted the DEF-tool-caller-sly-data branch February 21, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants