feat(core): implement full memory pipeline (#11)
This commit was merged in pull request #11.
This commit is contained in:
@@ -144,10 +144,13 @@ impl ChatClient {
|
||||
let mut last_error: Option<anyhow::Error> = None;
|
||||
|
||||
for attempt in 0..self.max_retries {
|
||||
let response = self
|
||||
.http
|
||||
.post(&url)
|
||||
.header("apikey", &self.api_key)
|
||||
let mut req = self.http.post(&url);
|
||||
// Only add apikey header if it's not empty (for backward compatibility)
|
||||
if !self.api_key.is_empty() && !self.api_key.starts_with("http") {
|
||||
req = req.header("apikey", &self.api_key);
|
||||
}
|
||||
|
||||
let response = req
|
||||
.header("Content-Type", "application/json")
|
||||
.body(body.clone())
|
||||
.timeout(self.timeout)
|
||||
|
||||
Reference in New Issue
Block a user