Skip to content

Commit 056fa7d

Browse files
committed
fix host
1 parent 0a7bdb2 commit 056fa7d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/pinecone/data.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,12 @@ impl Index {
104104
namespace: &str,
105105
records: &[serde_json::Value],
106106
) -> Result<(), PineconeError> {
107-
let configuration = self.client.openapi_config.clone();
108-
109-
let client = self.client.openapi_config.client.clone();
107+
let configuration = &self.client.openapi_config;
108+
let client = &self.client.openapi_config.client;
110109

111110
let uri_str = format!(
112111
"{}/records/namespaces/{namespace}/upsert",
113-
configuration.base_path,
112+
self.host,
114113
namespace = crate::openapi::apis::urlencode(namespace)
115114
);
116115
let mut req_builder = client.request(reqwest::Method::POST, uri_str.as_str());
@@ -142,8 +141,6 @@ impl Index {
142141
source: anyhow::Error::from(e),
143142
})?;
144143

145-
println!("xxxxx request {:#?}", req);
146-
147144
let resp = client
148145
.execute(req)
149146
.await

0 commit comments

Comments
 (0)