Skip to content

Commit

Permalink
refactor: allow user_id to be transformed into from_credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly committed Nov 26, 2024
1 parent 4a6dd16 commit b21d97e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion python/dify_plugin/interfaces/tool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ def _invoke(self, tool_parameters: dict) -> Generator[ToolInvokeMessage, None]:
def from_credentials(
cls,
credentials: dict,
user_id: Optional[str] = None,
) -> "Tool":
return cls(
runtime=ToolRuntime(credentials=credentials, user_id=None, session_id=None),
runtime=ToolRuntime(credentials=credentials, user_id=user_id, session_id=None),
session=Session.empty_session(), # TODO could not fetch session here
)

Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="dify_plugin",
version="0.0.1-beta31",
version="0.0.1-beta32",
author="langgenius",
long_description_content_type="text/markdown",
url="https://github.com/langgenius/dify-plugin-sdks.git",
Expand Down

0 comments on commit b21d97e

Please sign in to comment.