Skip to content

Commit 6afb4dd

Browse files
committed
generate code based on 2025-01 api spec
1 parent 6e109e3 commit 6afb4dd

File tree

137 files changed

+7160
-649
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+7160
-649
lines changed

codegen/apis

Submodule apis updated from 39e90e2 to 24c6261

src/integration/java/io/pinecone/integration/inference/EmbedTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void testGenerateEmbeddings() throws ApiException {
3535

3636
assertNotNull(embeddings, "Expected embedding to be not null");
3737
Assertions.assertEquals(embeddingModel, embeddings.getModel());
38-
Assertions.assertEquals(1024, embeddings.getData().get(0).getValues().size());
38+
Assertions.assertEquals(1024, embeddings.getData().get(0).getDenseEmbedding().getValues().size());
3939
Assertions.assertEquals(2, embeddings.getData().size());
4040
}
4141

src/integration/java/io/pinecone/integration/inference/RerankTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,32 @@ public class RerankTest {
2222
public void testRerank() throws ApiException {
2323
String model = "bge-reranker-v2-m3";
2424
String query = "The tech company Apple is known for its innovative products like the iPhone.";
25-
List<Map<String, String>> documents = new ArrayList<>();
25+
List<Map<String, Object>> documents = new ArrayList<>();
2626

27-
Map<String, String> doc1 = new HashMap<>();
27+
Map<String, Object> doc1 = new HashMap<>();
2828
doc1.put("id", "vec1");
2929
doc1.put("my_field", "Apple is a popular fruit known for its sweetness and crisp texture.");
3030
documents.add(doc1);
3131

32-
Map<String, String> doc2 = new HashMap<>();
32+
Map<String, Object> doc2 = new HashMap<>();
3333
doc2.put("id", "vec2");
3434
doc2.put("my_field", "Many people enjoy eating apples as a healthy snack.");
3535
documents.add(doc2);
3636

37-
Map<String, String> doc3 = new HashMap<>();
37+
Map<String, Object> doc3 = new HashMap<>();
3838
doc3.put("id", "vec3");
3939
doc3.put("my_field", "Apple Inc. has revolutionized the tech industry with its sleek designs and user-friendly interfaces.");
4040
documents.add(doc3);
4141

42-
Map<String, String> doc4 = new HashMap<>();
42+
Map<String, Object> doc4 = new HashMap<>();
4343
doc4.put("id", "vec4");
4444
doc4.put("my_field", "An apple a day keeps the doctor away, as the saying goes.");
4545
documents.add(doc4);
4646

4747
List<String> rankFields = Arrays.asList("my_field");
4848
int topN = 2;
4949
boolean returnDocuments = true;
50-
Map<String, String> parameters = new HashMap<>();
50+
Map<String, Object> parameters = new HashMap<>();
5151
parameters.put("truncate", "END");
5252

5353
RerankResult result = inference.rerank(model, query, documents, rankFields, topN, returnDocuments, parameters);
@@ -63,24 +63,24 @@ public void testRerank() throws ApiException {
6363
public void testRerankWithRequiredParameters() throws ApiException {
6464
String model = "bge-reranker-v2-m3";
6565
String query = "The tech company Apple is known for its innovative products like the iPhone.";
66-
List<Map<String, String>> documents = new ArrayList<>();
66+
List<Map<String, Object>> documents = new ArrayList<>();
6767

68-
Map<String, String> doc1 = new HashMap<>();
68+
Map<String, Object> doc1 = new HashMap<>();
6969
doc1.put("id", "vec1");
7070
doc1.put("text", "Apple is a popular fruit known for its sweetness and crisp texture.");
7171
documents.add(doc1);
7272

73-
Map<String, String> doc2 = new HashMap<>();
73+
Map<String, Object> doc2 = new HashMap<>();
7474
doc2.put("id", "vec2");
7575
doc2.put("text", "Many people enjoy eating apples as a healthy snack.");
7676
documents.add(doc2);
7777

78-
Map<String, String> doc3 = new HashMap<>();
78+
Map<String, Object> doc3 = new HashMap<>();
7979
doc3.put("id", "vec3");
8080
doc3.put("text", "Apple Inc. has revolutionized the tech industry with its sleek designs and user-friendly interfaces.");
8181
documents.add(doc3);
8282

83-
Map<String, String> doc4 = new HashMap<>();
83+
Map<String, Object> doc4 = new HashMap<>();
8484
doc4.put("id", "vec4");
8585
doc4.put("text", "An apple a day keeps the doctor away, as the saying goes.");
8686
documents.add(doc4);

src/main/java/io/pinecone/clients/Inference.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ public Inference(PineconeConfig config) {
4949
* @throws ApiException If the API call fails, an ApiException is thrown.
5050
*/
5151
public EmbeddingsList embed(String model, Map<String, Object> parameters, List<String> inputs) throws ApiException {
52-
EmbedRequestParameters embedRequestParameters = new EmbedRequestParameters();
53-
parameters.forEach(embedRequestParameters::putAdditionalProperty);
52+
// EmbedRequestParameters embedRequestParameters = new EmbedRequestParameters();
53+
// parameters.forEach(embedRequestParameters::putAdditionalProperty);
5454

5555
EmbedRequest embedRequest = new EmbedRequest()
5656
.model(model)
57-
.parameters(embedRequestParameters)
57+
.parameters(parameters)
5858
.inputs(convertToEmbedInputs(inputs));
5959

6060
return inferenceApi.embed(embedRequest);
@@ -74,7 +74,7 @@ public EmbeddingsList embed(String model, Map<String, Object> parameters, List<S
7474
*/
7575
public RerankResult rerank(String model,
7676
String query,
77-
List<Map<String, String>> documents) throws ApiException {
77+
List<Map<String, Object>> documents) throws ApiException {
7878
return rerank(model,
7979
query,
8080
documents,
@@ -100,11 +100,11 @@ public RerankResult rerank(String model,
100100
*/
101101
public RerankResult rerank(String model,
102102
String query,
103-
List<Map<String, String>> documents,
103+
List<Map<String, Object>> documents,
104104
List<String> rankFields,
105105
int topN,
106106
boolean returnDocuments,
107-
Map<String, String> parameters) throws ApiException {
107+
Map<String, Object> parameters) throws ApiException {
108108
RerankRequest rerankRequest = new RerankRequest();
109109

110110
rerankRequest

src/main/java/org/openapitools/db_control/client/ApiCallback.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Pinecone Control Plane API
33
* Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors.
44
*
5-
* The version of the OpenAPI document: 2024-10
5+
* The version of the OpenAPI document: 2025-01
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/main/java/org/openapitools/db_control/client/ApiClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Pinecone Control Plane API
33
* Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors.
44
*
5-
* The version of the OpenAPI document: 2024-10
5+
* The version of the OpenAPI document: 2025-01
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -140,7 +140,7 @@ private void init() {
140140
json = new JSON();
141141

142142
// Set default User-Agent.
143-
setUserAgent("OpenAPI-Generator/2024-10/java");
143+
setUserAgent("OpenAPI-Generator/2025-01/java");
144144

145145
authentications = new HashMap<String, Authentication>();
146146
}

src/main/java/org/openapitools/db_control/client/ApiException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Pinecone Control Plane API
33
* Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors.
44
*
5-
* The version of the OpenAPI document: 2024-10
5+
* The version of the OpenAPI document: 2025-01
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -21,7 +21,7 @@
2121
* <p>ApiException class.</p>
2222
*/
2323
@SuppressWarnings("serial")
24-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]")
24+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]")
2525
public class ApiException extends Exception {
2626
private int code = 0;
2727
private Map<String, List<String>> responseHeaders = null;

src/main/java/org/openapitools/db_control/client/ApiResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Pinecone Control Plane API
33
* Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors.
44
*
5-
* The version of the OpenAPI document: 2024-10
5+
* The version of the OpenAPI document: 2025-01
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/main/java/org/openapitools/db_control/client/Configuration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Pinecone Control Plane API
33
* Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors.
44
*
5-
* The version of the OpenAPI document: 2024-10
5+
* The version of the OpenAPI document: 2025-01
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,9 +13,9 @@
1313

1414
package org.openapitools.db_control.client;
1515

16-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-23T20:47:10.542209Z[Etc/UTC]")
16+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-10T18:59:18.406889Z[Etc/UTC]")
1717
public class Configuration {
18-
public static final String VERSION = "2024-10";
18+
public static final String VERSION = "2025-01";
1919

2020
private static ApiClient defaultApiClient = new ApiClient();
2121

src/main/java/org/openapitools/db_control/client/GzipRequestInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Pinecone Control Plane API
33
* Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors.
44
*
5-
* The version of the OpenAPI document: 2024-10
5+
* The version of the OpenAPI document: 2025-01
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

0 commit comments

Comments
 (0)