Skip to content

Commit 21196c2

Browse files
committed
v1.0.2
1 parent 6bd1e37 commit 21196c2

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

pydify/__init__.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
这个库提供了与Dify API交互的简单方式,支持所有主要功能,
55
包括对话、文本生成、工作流、文件上传等。
66
"""
7+
78
from .agent import AgentClient, DifyBaseClient
89
from .chatbot import ChatbotClient
910
from .chatflow import ChatflowClient
@@ -13,24 +14,25 @@
1314

1415
def create_client(type: str, base_url: str, api_key: str) -> DifyBaseClient:
1516
if type == "workflow":
16-
return WorkflowClient(base_url, api_key)
17+
return WorkflowClient(base_url=base_url, api_key=api_key)
1718
elif type == "chatbot":
18-
return ChatbotClient(base_url, api_key)
19+
return ChatbotClient(base_url=base_url, api_key=api_key)
1920
elif type == "chatflow":
20-
return ChatflowClient(base_url, api_key)
21+
return ChatflowClient(base_url=base_url, api_key=api_key)
2122
elif type == "agent":
22-
return AgentClient(base_url, api_key)
23+
return AgentClient(base_url=base_url, api_key=api_key)
2324
elif type == "text_generation" or type == "text":
24-
return TextGenerationClient(base_url, api_key)
25+
return TextGenerationClient(base_url=base_url, api_key=api_key)
2526
else:
2627
raise ValueError(f"Invalid client type: {type}")
2728

28-
__version__ = "1.0.0"
29+
30+
__version__ = "1.0.2"
2931
__all__ = [
3032
"WorkflowClient",
3133
"ChatbotClient",
3234
"ChatflowClient",
3335
"AgentClient",
3436
"TextGenerationClient",
3537
"create_client",
36-
]
38+
]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
setuptools.setup(
3535
name="pydify",
36-
version="1.0.1",
36+
version="1.0.2",
3737
author="Dify SDK Team",
3838
author_email="[email protected]",
3939
description="A Python SDK for interacting with Dify API",

0 commit comments

Comments
 (0)