Dependencies
No additional dependencies are required beyond the Python package. The Dify resource useshttpx for async API calls.
For credential setup, see the Dify Setup guide.
Configuration
Config Reference
| Field | Required | Default | Description |
|---|---|---|---|
api_key | Yes | Dify Knowledge API key | |
base_url | Yes | Dify API base URL | |
dataset_id | Yes | Dify Knowledge dataset | |
slug_metadata_name | No | slug | Dify document metadata name used as the virtual path slug |
DifyConfig normalizes base_url by removing a trailing slash and trims
slug_metadata_name.
Environment Example
Metadata Setup
For stable filesystem paths and scoped search, add a Dify document metadata field named byslug_metadata_name. The default field name is slug.
path instead, configure:
search work for those name-based
documents, enable Dify’s Built-in Fields in the dataset metadata settings so
document_name can be used as a metadata filter.
See Dify Setup for the full metadata
checklist.