Skip to main content

DifyTools: 包含 Dify 和 Ragflow 工具

Project description

DifyTools

安装

  1. 克隆仓库到本地:

    git clone https://github.com/Lingwuxin/DifyTools.git
    
  2. 进入项目目录并安装依赖:

    cd DifyTools
    pip install -r requirements.txt
    
  3. 配置 Dify API 信息
    dify/config.json 文件中填写你的 api_keybase_url


使用方法

1. 运行脚本示例

dify/Dify.py 中有示例代码:

from dify.Dify import Dify

# 加载配置
import json
load_config = json.load(open("./dify/config.json", "r", encoding="utf-8"))
api_key = load_config['api_key']
base_url = load_config['base_url']

dify = Dify(api_key, base_url)

# 运行工作流
result = dify.run_workflow(response_mode='blocking', query='阿克苏哪些水果好吃?')
print(result)

2. 上传文件

file_id = dify.upload_file('your_file.xlsx', user='your_user')

3. 自定义工作流输入

result = dify.run_workflow(response_mode='blocking', query='你好', other_param='xxx')

热爱的 me

热爱是最好的老师,愿你在代码和生活中都能找到属于自己的热爱。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

difytools-0.0.4.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

difytools-0.0.4-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file difytools-0.0.4.tar.gz.

File metadata

  • Download URL: difytools-0.0.4.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for difytools-0.0.4.tar.gz
Algorithm Hash digest
SHA256 a1ff3ff062d0ccbeb04c9fe4fedc797c31383dc63c5c386670824c0f6cea9c51
MD5 2b206a1389adb484e06f19282eda75e3
BLAKE2b-256 01d5efaa6509074f1987bc2b95484a652df545c064d0f6f9cba6c82b6b60b6f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for difytools-0.0.4.tar.gz:

Publisher: build-package.yml on Lingwuxin/DifyTools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file difytools-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: difytools-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for difytools-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6933a24a5d84ea7531e0b760a4c40bc70e022bcf732008f2e2f976cec719368a
MD5 bb4ddac41449c5e32d73a99fa6521a0e
BLAKE2b-256 a3011fc1240d8eb2be99786ece02e8246b6c11cbd92a071264c387cb93fd9d00

See more details on using hashes here.

Provenance

The following attestation bundles were made for difytools-0.0.4-py3-none-any.whl:

Publisher: build-package.yml on Lingwuxin/DifyTools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page