-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
141 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
cmd/commandline/plugin/templates/python/agent_provider.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
identity: | ||
author: {{ .Author }} | ||
name: {{ .PluginName }} | ||
label: | ||
en_US: {{ .PluginName | SnakeToCamel }} | ||
description: | ||
en_US: {{ .PluginName | SnakeToCamel }} | ||
icon: icon.svg | ||
strategies: | ||
- strategies/{{ .PluginName }}.yaml | ||
extra: | ||
python: | ||
source: provider/{{ .PluginName }}.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from collections.abc import Generator | ||
from typing import Any | ||
|
||
|
||
from dify_plugin.entities.agent import AgentInvokeMessage | ||
from dify_plugin.interfaces.agent import AgentStrategy | ||
|
||
|
||
class {{ .PluginName | SnakeToCamel }}AgentStrategy(AgentStrategy): | ||
def _invoke(self, parameters: dict[str, Any]) -> Generator[AgentInvokeMessage]: | ||
pass |
26 changes: 26 additions & 0 deletions
26
cmd/commandline/plugin/templates/python/agent_strategy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
identity: | ||
name: {{ .PluginName }} | ||
author: {{ .Author }} | ||
label: | ||
en_US: {{ .PluginName | SnakeToCamel }} | ||
description: | ||
en_US: {{ .PluginName | SnakeToCamel }} | ||
parameters: | ||
- name: model | ||
type: model-selector | ||
scope: tool-call&llm | ||
required: true | ||
label: | ||
en_US: Model | ||
zh_Hans: 模型 | ||
pt_BR: Model | ||
- name: tools | ||
type: array[tools] | ||
required: true | ||
label: | ||
en_US: Tools list | ||
zh_Hans: 工具列表 | ||
pt_BR: Tools list | ||
extra: | ||
python: | ||
source: strategies/{{ .PluginName }}.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters