File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 44这个库提供了与Dify API交互的简单方式,支持所有主要功能,
55包括对话、文本生成、工作流、文件上传等。
66"""
7+
78from .agent import AgentClient , DifyBaseClient
89from .chatbot import ChatbotClient
910from .chatflow import ChatflowClient
1314
1415def 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+ ]
Original file line number Diff line number Diff line change 3333
3434setuptools .setup (
3535 name = "pydify" ,
36- version = "1.0.1 " ,
36+ version = "1.0.2 " ,
3737 author = "Dify SDK Team" ,
38383939 description = "A Python SDK for interacting with Dify API" ,
You can’t perform that action at this time.
0 commit comments