refactor: use absolute paths

This commit is contained in:
Yeuoly
2024-12-03 15:19:19 +08:00
parent 68994741cd
commit 435c0da60e
66 changed files with 253 additions and 197 deletions
+4
View File
@@ -0,0 +1,4 @@
INSTALL_METHOD=remote
REMOTE_INSTALL_HOST=localhost
REMOTE_INSTALL_PORT=5003
REMOTE_INSTALL_KEY=9c602ad1-6392-45b9-bc4b-20875a95c56c
+5 -1
View File
@@ -1,4 +1,8 @@
from dify_plugin import DifyPluginEnv, Plugin
import sys
sys.path.append("../..")
from dify_plugin import Plugin, DifyPluginEnv
plugin = Plugin(DifyPluginEnv(MAX_REQUEST_TIMEOUT=30))
@@ -9,6 +9,7 @@ class Summary(Tool):
response = self.session.model.summary.invoke(
text="Hello, world!",
instruction="Summarize the text",
min_summarize_length=1,
)
yield self.create_json_message(
@@ -6,4 +6,4 @@ from dify_plugin.entities.tool import ToolInvokeMessage
class ToolTool(Tool):
def _invoke(self, tool_parameters: dict) -> Generator[ToolInvokeMessage, None, None]:
return super()._invoke(tool_parameters)
yield self.create_image_message("https://assets.dify.ai/images/dify_logo_dark_s.png")