We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6baa0a commit f8bf3ddCopy full SHA for f8bf3dd
1 file changed
crates/tools/src/web_search.rs
@@ -211,7 +211,10 @@ impl WebSearchTool {
211
.get(&url)
212
.header("Accept", "application/json")
213
.header("Accept-Encoding", "gzip")
214
- .header("X-Subscription-Token", self.api_key.expose_secret().as_str());
+ .header(
215
+ "X-Subscription-Token",
216
+ self.api_key.expose_secret().as_str(),
217
+ );
218
if let Some(lang) = accept_language {
219
req = req.header("Accept-Language", lang);
220
}
@@ -269,7 +272,10 @@ impl WebSearchTool {
269
272
270
273
let resp = client
271
274
.post(format!("{base_url}/chat/completions"))
- .header("Authorization", format!("Bearer {}", self.api_key.expose_secret()))
275
276
+ "Authorization",
277
+ format!("Bearer {}", self.api_key.expose_secret()),
278
+ )
279
.json(&body)
280
.send()
281
.await?;
0 commit comments