Skip to content

Commit

Permalink
add clone and debug derive to endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
chenwanqq committed Apr 16, 2024
1 parent 1779ab1 commit 23bcdda
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

```toml
[dependencies]
erniebot-rs = "0.3.1"
erniebot-rs = "0.3.2"
```

## 鉴权
Expand Down
1 change: 1 addition & 0 deletions src/chat/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/embedding/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/reranker/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/text2image/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 23bcdda

Please sign in to comment.