DifyTools: 包含 Dify 和 Ragflow 工具
Project description
DifyTools
安装
-
克隆仓库到本地:
git clone https://github.com/Lingwuxin/DifyTools.git
-
进入项目目录并安装依赖:
cd DifyTools pip install -r requirements.txt
-
配置 Dify API 信息
在dify/config.json文件中填写你的api_key和base_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ff8eead234512d32eb43bef8600c891ff57442dd50db5ad5113d9bb5e779f74
|
|
| MD5 |
591909debd15bb472f17546e82f6f743
|
|
| BLAKE2b-256 |
cae886831f22db62800a9f68776c3bb6ee608d50f8f3a9000a53f0adfdac03c7
|
Provenance
The following attestation bundles were made for difytools-0.0.3.tar.gz:
Publisher:
build-package.yml on Lingwuxin/DifyTools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
difytools-0.0.3.tar.gz -
Subject digest:
1ff8eead234512d32eb43bef8600c891ff57442dd50db5ad5113d9bb5e779f74 - Sigstore transparency entry: 432732927
- Sigstore integration time:
-
Permalink:
Lingwuxin/DifyTools@3827b6bcb3b4a9059b1be3046d3be59a2537745b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Lingwuxin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-package.yml@3827b6bcb3b4a9059b1be3046d3be59a2537745b -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e236b961db2234f50c801ca31ebbabacc7ccb04938bf968422f7d03275f6720b
|
|
| MD5 |
ebfae784ed45456e2841479661d60b1b
|
|
| BLAKE2b-256 |
43f123b5872c4bf176232dfd57cc66b7811cad9e4df1b0c49832af56c0bf758d
|
Provenance
The following attestation bundles were made for difytools-0.0.3-py3-none-any.whl:
Publisher:
build-package.yml on Lingwuxin/DifyTools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
difytools-0.0.3-py3-none-any.whl -
Subject digest:
e236b961db2234f50c801ca31ebbabacc7ccb04938bf968422f7d03275f6720b - Sigstore transparency entry: 432732938
- Sigstore integration time:
-
Permalink:
Lingwuxin/DifyTools@3827b6bcb3b4a9059b1be3046d3be59a2537745b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Lingwuxin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-package.yml@3827b6bcb3b4a9059b1be3046d3be59a2537745b -
Trigger Event:
push
-
Statement type: