Crates.io | dify-client |
lib.rs | dify-client |
version | 0.3.1 |
source | src |
created_at | 2024-04-28 07:57:50.533529 |
updated_at | 2024-05-28 11:38:05.245564 |
description | A client for the Dify API |
homepage | https://docs.dify.ai |
repository | https://github.com/rming/dify-sdk-rs |
max_upload_size | |
id | 1223067 |
size | 97,548 |
The Dify Client is a Rust library for interacting with the Dify service. It provides a convenient way to integrate Dify functionality into your Rust applications.
To add dify-client
to your package, add the following to your Cargo.toml
:
[dependencies]
dify-client = "0.3"
By default, the library uses the default-tls
feature, which uses the reqwest
crate with the default TLS backend. If you want to use the rustls
TLS backend, you can enable the rustls-tls
feature (which avoids depending on native libraries like openssl
):
[dependencies]
dify-client = { version = "0.3", default-features = false, features = ["rustls-tls"] }
To run the tests, you need to set the DIFY_API_KEY
and DIFY_BASE_URL
environment variables.
export DIFY_API_KEY=your_api_key
export DIFY_BASE_URL=https://api.dify.io
Then you can run the tests with:
cargo test
# cargo test -- --nocapture
# cargo test test_feedback_message -- --nocapture
To generate the documentation, run:
cargo doc --no-deps --lib --open