diff --git a/Cargo.toml b/Cargo.toml index baf6747..9a18ed7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ license = "MIT" description = "A unofficial Rust library for the Ernie API" homepage = "https://github.com/chenwanqq/erniebot-rs" repository = "https://github.com/chenwanqq/erniebot-rs" -version = "0.3.1" +version = "0.3.2" edition = "2021" exclude = [".github/",".vscode/",".gitignore"] diff --git a/README.md b/README.md index 6f0f256..0ec644c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Add the following to your Cargo.toml file: ```toml [dependencies] -erniebot-rs = "0.3.1" +erniebot-rs = "0.3.2" ``` ## Authentication diff --git a/README_zh.md b/README_zh.md index 1dbb354..70c4e81 100644 --- a/README_zh.md +++ b/README_zh.md @@ -10,7 +10,7 @@ ```toml [dependencies] -erniebot-rs = "0.3.1" +erniebot-rs = "0.3.2" ``` ## 鉴权 diff --git a/src/chat/endpoint.rs b/src/chat/endpoint.rs index dc1e5ca..1f19a5a 100644 --- a/src/chat/endpoint.rs +++ b/src/chat/endpoint.rs @@ -15,6 +15,7 @@ static CHAT_API_URL: &str = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxi /** ChatEndpoint is a struct that represents the chat endpoint of erniebot API */ +#[derive(Debug, Clone)] pub struct ChatEndpoint { url: Url, access_token: String, diff --git a/src/embedding/endpoint.rs b/src/embedding/endpoint.rs index fa79d3e..de808ec 100644 --- a/src/embedding/endpoint.rs +++ b/src/embedding/endpoint.rs @@ -11,6 +11,7 @@ static EMBEDDING_BASE_URL: &str = /** ChatEndpoint is a struct that represents the chat endpoint of erniebot API */ +#[derive(Debug, Clone)] pub struct EmbeddingEndpoint { url: Url, access_token: String, diff --git a/src/reranker/endpoint.rs b/src/reranker/endpoint.rs index 8467bfe..20e6783 100644 --- a/src/reranker/endpoint.rs +++ b/src/reranker/endpoint.rs @@ -11,6 +11,7 @@ static RERANKER_BASE_URL: &str = /** ChatEndpoint is a struct that represents the chat endpoint of erniebot API */ +#[derive(Debug, Clone)] pub struct RerankerEndpoint { url: Url, access_token: String, diff --git a/src/text2image/endpoint.rs b/src/text2image/endpoint.rs index 3a394c6..6cbf3bb 100644 --- a/src/text2image/endpoint.rs +++ b/src/text2image/endpoint.rs @@ -11,6 +11,7 @@ use crate::utils::{build_url, get_access_token}; static TEXT2IMAGE_BASE_URL: &str = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/text2image/"; /// Text2ImageEndpoint is a struct that represents the text2image endpoint of erniebot API +#[derive(Debug, Clone)] pub struct Text2ImageEndpoint { url: Url, access_token: String,