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.3.tar.gz (6.8 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.3-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: difytools-0.0.3.tar.gz
  • Upload date:
  • Size: 6.8 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.3.tar.gz
Algorithm Hash digest
SHA256 1ff8eead234512d32eb43bef8600c891ff57442dd50db5ad5113d9bb5e779f74
MD5 591909debd15bb472f17546e82f6f743
BLAKE2b-256 cae886831f22db62800a9f68776c3bb6ee608d50f8f3a9000a53f0adfdac03c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for difytools-0.0.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: difytools-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.3 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e236b961db2234f50c801ca31ebbabacc7ccb04938bf968422f7d03275f6720b
MD5 ebfae784ed45456e2841479661d60b1b
BLAKE2b-256 43f123b5872c4bf176232dfd57cc66b7811cad9e4df1b0c49832af56c0bf758d

See more details on using hashes here.

Provenance

The following attestation bundles were made for difytools-0.0.3-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