Skip to content

Commit

Permalink
Bypass proxy in MoFa server clients
Browse files Browse the repository at this point in the history
  • Loading branch information
joulei committed Jan 21, 2025
1 parent bf96297 commit eb61d41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion moly-mofa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,14 @@ impl MofaClient {
content: task,
}],
};
let client = reqwest::Client::new();
let client = reqwest::Client::builder()
.no_proxy()
.build()
.expect("Failed to build a reqwest client for a MoFa server");

let req = client
.post(format!("{}/v1/chat/completions", &address))
.header("Content-Type", "application/json")
.json(&data);

current_request = Some(rt.spawn(async move {
Expand Down

0 comments on commit eb61d41

Please sign in to comment.