mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
plugin in different version dify errror #768
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lcy0520 on GitHub (Oct 30, 2025).
Self Checks
Dify version
1.4.0
Plugin version
自定义版本
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
The plugin worked fine in version 1.9.1, but an error occurred after importing it into version 1.4.0.
YAML content:
identity:
name: "knowledge-graph-retrieval"
author: "lj"
label:
en_US: "Knowledge Graph Retrieval"
zh_Hans: "Knowledge Graph Retrieval"
pt_BR: "Recuperação de Grafo de Conhecimento"
ja_JP: "ナレッジグラフ検索"
description:
human:
en_US: "An advanced knowledge graph retrieval tool that takes a pre-built knowledge graph and a query text snippet, then intelligently retrieves relevant subgraphs through entity extraction and neighborhood expansion. The tool extracts entities from the query text and retrieves their surrounding context in the knowledge graph, providing rich semantic information."
zh_Hans: "先进的知识图谱检索工具,接收预先构建的知识图谱和查询文本片段,然后通过实体提取和邻域扩展智能检索相关子图。该工具从查询文本中提取实体,并在知识图谱中检索其周围的上下文,提供丰富的语义信息。"
pt_BR: "Uma ferramenta avançada de recuperação de grafo de conhecimento que recebe um grafo pré-construído e um trecho de texto de consulta, e então recupera inteligentemente subgrafos relevantes através da extração de entidades e expansão de vizinhança."
ja_JP: "事前に構築されたナレッジグラフとクエリテキストスニペットを受け取り、エンティティ抽出と近隣拡張を通じて関連するサブグラフをインテリジェントに取得する高度なナレッジグラフ検索ツール。"
llm: "A knowledge graph retrieval tool that extracts entities from query text and retrieves relevant subgraphs from a pre-built knowledge graph using neighborhood expansion and semantic matching."
parameters:
========== 核心参数 ==========
name: knowledge_graph_json
type: string
required: true
label:
en_US: Knowledge Graph (JSON)
zh_Hans: 知识图谱(JSON)
pt_BR: Grafo de Conhecimento (JSON)
ja_JP: ナレッジグラフ(JSON)
human_description:
en_US: "A pre-built knowledge graph in node-link JSON format. Reference from knowledge graph generator output: {{knowledge_graph_generator.text}}"
zh_Hans: "预先构建的知识图谱,采用 node-link JSON 格式。请引用知识图谱生成器输出:{{knowledge_graph_generator.text}}"
pt_BR: "Um grafo de conhecimento pré-construído no formato JSON node-link. Referência da saída do gerador de grafo de conhecimento: {{knowledge_graph_generator.text}}"
ja_JP: "事前に構築されたナレッジグラフ(node-link JSON形式)。ナレッジグラフジェネレーター出力から参照:{{knowledge_graph_generator.text}}"
llm_description: "Pre-built knowledge graph in node-link JSON format. Use variable reference: {{knowledge_graph_generator.text}}"
form: llm
name: query_text
type: string
required: true
label:
en_US: Query Text
zh_Hans: 查询文本
pt_BR: Texto de Consulta
ja_JP: クエリテキスト
human_description:
en_US: "The text snippet to extract entities from for retrieval. This is plain text, not a JSON array."
zh_Hans: "用于提取实体并进行检索的文本片段。这是纯文本,不是 JSON 数组。"
pt_BR: "O trecho de texto para extrair entidades para recuperação. Este é texto simples, não um array JSON."
ja_JP: "検索のためにエンティティを抽出するテキストスニペット。これはプレーンテキストで、JSON配列ではありません。"
llm_description: "Plain text query to extract entities from for subgraph retrieval"
form: llm
name: retrieval_depth
type: number
required: false
default: 1
label:
en_US: Retrieval Depth
zh_Hans: 检索深度
pt_BR: Profundidade de Recuperação
ja_JP: 検索深度
human_description:
en_US: "The depth of neighborhood expansion. 1 means direct neighbors, 2 means 2-hop neighbors, etc. Default is 1."
zh_Hans: "邻域扩展的深度。1表示直接邻居,2表示2跳邻居,以此类推。默认为1。"
pt_BR: "A profundidade da expansão de vizinhança. 1 significa vizinhos diretos, 2 significa vizinhos de 2 saltos, etc."
ja_JP: "近隣拡張の深さ。1は直接の隣接ノード、2は2ホップの隣接ノードなど。"
llm_description: "Depth of neighborhood expansion for retrieval (default: 1)"
form: llm
========== LLM 配置参数 ==========
name: llm_url
type: string
required: true
label:
en_US: LLM API URL
zh_Hans: LLM API 地址
pt_BR: URL da API LLM
ja_JP: LLM API URL
human_description:
en_US: "The base URL of the LLM API endpoint, e.g., https://api.example.com/v1"
zh_Hans: "LLM API的基础URL,例如:https://api.example.com/v1"
pt_BR: "A URL base do endpoint da API LLM."
ja_JP: "LLM APIエンドポイントのベースURL。"
llm_description: "Base URL for the LLM API"
form: llm
name: llm_api_key
type: string
required: true
label:
en_US: LLM API Key
zh_Hans: LLM API 密钥
pt_BR: Chave da API LLM
ja_JP: LLM APIキー
human_description:
en_US: "The API key for authenticating with the LLM service"
zh_Hans: "用于LLM服务认证的API密钥"
pt_BR: "A chave da API para autenticação com o serviço LLM."
ja_JP: "LLMサービスとの認証用APIキー。"
llm_description: "API key for LLM authentication"
form: llm
name: llm_model_name
type: string
required: false
default: "glm-4-flash"
label:
en_US: LLM Model Name
zh_Hans: LLM 模型名称
pt_BR: Nome do Modelo LLM
ja_JP: LLMモデル名
human_description:
en_US: "The name of the LLM model to use. Default is 'glm-4-flash'."
zh_Hans: "要使用的LLM模型名称。默认为'glm-4-flash'。"
pt_BR: "O nome do modelo LLM a ser usado."
ja_JP: "使用するLLMモデルの名前。"
llm_description: "LLM model name (default: glm-4-flash)"
form: llm
========== 高级参数 ==========
name: use_context
type: boolean
required: false
default: true
label:
en_US: Use Context Window
zh_Hans: 使用上下文窗口
pt_BR: Usar Janela de Contexto
ja_JP: コンテキストウィンドウを使用
human_description:
en_US: "Whether to use context window when processing text segments. Default is true."
zh_Hans: "处理文本段落时是否使用上下文窗口。默认为true。"
pt_BR: "Se deve usar janela de contexto ao processar segmentos de texto."
ja_JP: "テキストセグメントを処理する際にコンテキストウィンドウを使用するかどうか。"
llm_description: "Enable context window for text processing (default: true)"
form: llm
name: context_window
type: number
required: false
default: 1
label:
en_US: Context Window Size
zh_Hans: 上下文窗口大小
pt_BR: Tamanho da Janela de Contexto
ja_JP: コンテキストウィンドウサイズ
human_description:
en_US: "The size of the context window (number of surrounding segments to include). Default is 1."
zh_Hans: "上下文窗口的大小(要包含的周围段落数)。默认为1。"
pt_BR: "O tamanho da janela de contexto (número de segmentos circundantes a incluir)."
ja_JP: "コンテキストウィンドウのサイズ(含める周囲のセグメント数)。"
llm_description: "Context window size for text processing (default: 1)"
form: llm
========== 语义检索参数 ==========
name: enable_semantic_retrieval
type: boolean
required: false
default: true
label:
en_US: Enable Semantic Retrieval
zh_Hans: 启用语义检索
pt_BR: Ativar Recuperação Semântica
ja_JP: セマンティック検索を有効にする
human_description:
en_US: "Enable semantic retrieval using embedding models for better recall. Falls back to exact matching if disabled or fails."
zh_Hans: "启用基于 embedding 模型的语义检索,提高召回率。禁用或失败时降级到精确匹配。"
pt_BR: "Ativar recuperação semântica usando modelos de embedding para melhor recall."
ja_JP: "Embeddingモデルを使用したセマンティック検索を有効にして、リコール率を向上させます。"
llm_description: "Enable semantic retrieval for better entity matching (default: true)"
form: llm
name: embedding_model
type: model-selector
scope: text-embedding
required: false
label:
en_US: Embedding Model
zh_Hans: Embedding 模型
pt_BR: Modelo de Embedding
ja_JP: Embeddingモデル
human_description:
en_US: "The embedding model to use for semantic entity linking. Required when semantic retrieval is enabled."
zh_Hans: "用于语义实体链接的 embedding 模型。启用语义检索时必需。"
pt_BR: "O modelo de embedding a ser usado para ligação semântica de entidades."
ja_JP: "セマンティックエンティティリンクに使用するEmbeddingモデル。"
llm_description: "Embedding model for semantic retrieval"
form: form
name: similarity_threshold
type: number
required: false
default: 0.7
label:
en_US: Similarity Threshold
zh_Hans: 相似度阈值
pt_BR: Limiar de Similaridade
ja_JP: 類似度しきい値
human_description:
en_US: "Minimum cosine similarity (0-1) for entity linking. Higher values mean stricter matching. Default is 0.85."
zh_Hans: "实体链接的最小余弦相似度(0-1)。值越高匹配越严格。默认为0.7。"
pt_BR: "Similaridade mínima de cosseno (0-1) para ligação de entidades."
ja_JP: "エンティティリンクの最小コサイン類似度(0-1)。"
llm_description: "Minimum similarity threshold for entity linking (default: 0.85)"
form: llm
name: entity_linking_top_k
type: number
required: false
default: 1
label:
en_US: Entity Linking Top K
zh_Hans: 实体链接候选数
pt_BR: Top K de Ligação de Entidade
ja_JP: エンティティリンクTop K
human_description:
en_US: "Number of candidate entities to return for each query entity during semantic linking. Higher values provide fallback options. Default is 1."
zh_Hans: "语义实体链接时,每个查询实体返回的候选数量。更高的值提供备选项。默认为1。"
pt_BR: "Número de entidades candidatas a retornar para cada entidade de consulta durante a ligação semântica."
ja_JP: "セマンティックリンク時に各クエリエンティティに対して返す候補エンティティの数。デフォルトは1。"
llm_description: "Top-K candidates for entity linking (default: 1)"
form: llm
extra:
python:
source: tools/knowledge_graph_retrieval.py
✔️ Error log
a client-side exception has occurred while loading
@dosubot[bot] commented on GitHub (Oct 30, 2025):
The client-side exception in Dify 1.4.0 is likely due to incompatibility between your plugin YAML (created for 1.9.1) and the older Dify version. Fields like
type: model-selectorandscope: text-embeddingare not supported in 1.4.0, which doesn't recognize these advanced schema features. This causes the frontend or backend to fail when parsing the plugin config, resulting in a generic client-side error rather than a clear schema validation message. This issue has been seen with other plugins using newer YAML fields or missing required fields in older Dify versions, such as missingcontext_sizefor embedding models, which triggers similar errors in 1.8.0 and earlier [source].To resolve this, remove unsupported fields (like
model-selectorandscope) from your YAML, and ensure only basic types and parameters present in Dify 1.4.0 are used. If your plugin relies on features introduced after 1.4.0, you may need to downgrade its functionality or upgrade your Dify instance for full compatibility. If you encounter errors about missing required fields, try manually adding them as a workaround [source].To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
