mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-25 05:25:23 -04:00
refactor: use absolute paths
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
INSTALL_METHOD=remote
|
||||
REMOTE_INSTALL_HOST=localhost
|
||||
REMOTE_INSTALL_PORT=5003
|
||||
REMOTE_INSTALL_KEY=9c602ad1-6392-45b9-bc4b-20875a95c56c
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user