Skip to content

Commit c838764

Browse files
authored
Merge pull request #43 from zeroentropy-ai/release-please--branches--main--changes--next--components--zeroentropy
release: 0.1.0-alpha.6
2 parents 1a1ff44 + f9c1f35 commit c838764

17 files changed

+154
-185
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.5"
2+
".": "0.1.0-alpha.6"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 15
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zeroentropy%2Fzeroentropy-f06c49dfd4b38a4f9d5bcad56348156bbf641aa8b7968acfbf655ad6ceff2126.yml
3-
openapi_spec_hash: cac52dd65fbcb65ffa7a183e764b7f06
4-
config_hash: beba80a17ba64c5439712e85129ab5ad
1+
configured_endpoints: 14
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zeroentropy%2Fzeroentropy-bd2f55f423e09b74f83cbad6034fb76f7052363308d02533a908b49543cff459.yml
3+
openapi_spec_hash: 6d7566ebda7fecac4069744949d547e0
4+
config_hash: e07cdee04c971e1db74e91a5a4cd981c

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## 0.1.0-alpha.6 (2025-07-08)
4+
5+
Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/zeroentropy-ai/zeroentropy-node/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)
6+
7+
### Features
8+
9+
* **api:** manual updates ([77ce9ac](https://github.com/zeroentropy-ai/zeroentropy-node/commit/77ce9ac0be4962f4f1795498d44678942cde51ce))
10+
* **api:** manual updates ([9a6e616](https://github.com/zeroentropy-ai/zeroentropy-node/commit/9a6e616d7eb9d907d6e99a01f0db9b07003e3a6a))
11+
* **api:** manual updates ([628fbde](https://github.com/zeroentropy-ai/zeroentropy-node/commit/628fbde29b47202ba454c4078b071ff5f7c6c603))
12+
* **api:** manual updates ([9fdb2c0](https://github.com/zeroentropy-ai/zeroentropy-node/commit/9fdb2c0631e1afee0bdc0c4c70c908a9b11d7310))
13+
* **api:** manual updates ([15ace1c](https://github.com/zeroentropy-ai/zeroentropy-node/commit/15ace1c140e20e35f8ed9f173cbd295b79e2e165))
14+
315
## 0.1.0-alpha.5 (2025-07-03)
416

517
Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/zeroentropy-ai/zeroentropy-node/compare/v0.1.0-alpha.4...v0.1.0-alpha.5)

api.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
# Admin
2-
3-
Types:
4-
5-
- <code><a href="./src/resources/admin.ts">AdminCreateOrganizationResponse</a></code>
6-
7-
Methods:
8-
9-
- <code title="post /admin/create-organization">client.admin.<a href="./src/resources/admin.ts">createOrganization</a>({ ...params }) -> AdminCreateOrganizationResponse</code>
10-
111
# Status
122

133
Types:
@@ -66,12 +56,12 @@ Methods:
6656
- <code title="post /queries/top-pages">client.queries.<a href="./src/resources/queries.ts">topPages</a>({ ...params }) -> QueryTopPagesResponse</code>
6757
- <code title="post /queries/top-snippets">client.queries.<a href="./src/resources/queries.ts">topSnippets</a>({ ...params }) -> QueryTopSnippetsResponse</code>
6858

69-
# Parsers
59+
# Models
7060

7161
Types:
7262

73-
- <code><a href="./src/resources/parsers.ts">ParserParseDocumentResponse</a></code>
63+
- <code><a href="./src/resources/models.ts">ModelRerankResponse</a></code>
7464

7565
Methods:
7666

77-
- <code title="post /parsers/parse-document">client.parsers.<a href="./src/resources/parsers.ts">parseDocument</a>({ ...params }) -> ParserParseDocumentResponse</code>
67+
- <code title="post /models/rerank">client.models.<a href="./src/resources/models.ts">rerank</a>({ ...params }) -> ModelRerankResponse</code>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zeroentropy",
3-
"version": "0.1.0-alpha.5",
3+
"version": "0.1.0-alpha.6",
44
"description": "The official TypeScript library for the ZeroEntropy API",
55
"author": "ZeroEntropy <[email protected]>",
66
"types": "dist/index.d.ts",

src/index.ts

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import * as Pagination from './pagination';
77
import { type GetDocumentInfoListCursorParams, GetDocumentInfoListCursorResponse } from './pagination';
88
import * as Uploads from './uploads';
99
import * as API from './resources/index';
10-
import { Admin, AdminCreateOrganizationParams, AdminCreateOrganizationResponse } from './resources/admin';
1110
import {
1211
CollectionAddParams,
1312
CollectionAddResponse,
@@ -33,7 +32,7 @@ import {
3332
DocumentUpdateResponse,
3433
Documents,
3534
} from './resources/documents';
36-
import { ParserParseDocumentParams, ParserParseDocumentResponse, Parsers } from './resources/parsers';
35+
import { ModelRerankParams, ModelRerankResponse, Models } from './resources/models';
3736
import {
3837
Queries,
3938
QueryTopDocumentsParams,
@@ -161,12 +160,11 @@ export class ZeroEntropy extends Core.APIClient {
161160
this.apiKey = apiKey;
162161
}
163162

164-
admin: API.Admin = new API.Admin(this);
165163
status: API.Status = new API.Status(this);
166164
collections: API.Collections = new API.Collections(this);
167165
documents: API.Documents = new API.Documents(this);
168166
queries: API.Queries = new API.Queries(this);
169-
parsers: API.Parsers = new API.Parsers(this);
167+
models: API.Models = new API.Models(this);
170168

171169
/**
172170
* Check whether the base URL is set to its default.
@@ -211,14 +209,13 @@ export class ZeroEntropy extends Core.APIClient {
211209
static fileFromPath = Uploads.fileFromPath;
212210
}
213211

214-
ZeroEntropy.Admin = Admin;
215212
ZeroEntropy.Status = Status;
216213
ZeroEntropy.Collections = Collections;
217214
ZeroEntropy.Documents = Documents;
218215
ZeroEntropy.DocumentGetInfoListResponsesGetDocumentInfoListCursor =
219216
DocumentGetInfoListResponsesGetDocumentInfoListCursor;
220217
ZeroEntropy.Queries = Queries;
221-
ZeroEntropy.Parsers = Parsers;
218+
ZeroEntropy.Models = Models;
222219
export declare namespace ZeroEntropy {
223220
export type RequestOptions = Core.RequestOptions;
224221

@@ -228,12 +225,6 @@ export declare namespace ZeroEntropy {
228225
type GetDocumentInfoListCursorResponse as GetDocumentInfoListCursorResponse,
229226
};
230227

231-
export {
232-
Admin as Admin,
233-
type AdminCreateOrganizationResponse as AdminCreateOrganizationResponse,
234-
type AdminCreateOrganizationParams as AdminCreateOrganizationParams,
235-
};
236-
237228
export {
238229
Status as Status,
239230
type StatusGetStatusResponse as StatusGetStatusResponse,
@@ -278,9 +269,9 @@ export declare namespace ZeroEntropy {
278269
};
279270

280271
export {
281-
Parsers as Parsers,
282-
type ParserParseDocumentResponse as ParserParseDocumentResponse,
283-
type ParserParseDocumentParams as ParserParseDocumentParams,
272+
Models as Models,
273+
type ModelRerankResponse as ModelRerankResponse,
274+
type ModelRerankParams as ModelRerankParams,
284275
};
285276
}
286277

src/resources/admin.ts

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/resources/documents.ts

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ export class Documents extends APIResource {
88
/**
99
* Updates a document. This endpoint is atomic.
1010
*
11-
* The only attribute currently supported for update is `metadata`. This endpoint
12-
* can only be called with a non-null `metadata` if the document status is
13-
* `indexed`.
11+
* Currently both `metadata` and `index_status` are supported.
1412
*
15-
* Sometimes, when updating a document, a new document ID will be assigned and the
16-
* previous will be deleted. For this reason, the previous and the new document ID
17-
* will both be returned in the response. If the document ID was not updated, then
18-
* these two IDs will be identical.
13+
* - When updating with a non-null `metadata`, the document must have
14+
* `index_status` of `indexed`. After this call, the document will have an
15+
* `index_status` of `not_indexed`, since the document will need to reindex with
16+
* the new metadata.
17+
* - When updating with a non-null `index_status`, setting it to
18+
* `not_parsed or `not_indexed`requires that the document must have`index_status`of`parsing_failed`or`indexing_failed`,
19+
* respectively.
1920
*
2021
* A `404 Not Found` status code will be returned, if the provided collection name
2122
* or document path does not exist.
@@ -106,9 +107,10 @@ export class Documents extends APIResource {
106107
export class DocumentGetInfoListResponsesGetDocumentInfoListCursor extends GetDocumentInfoListCursor<DocumentGetInfoListResponse> {}
107108

108109
export interface DocumentUpdateResponse {
109-
new_id: string;
110-
111-
previous_id: string;
110+
/**
111+
* This string will always be "Success!". This may change in the future.
112+
*/
113+
message?: string;
112114
}
113115

114116
export interface DocumentDeleteResponse {
@@ -274,6 +276,14 @@ export interface DocumentUpdateParams {
274276
*/
275277
path: string;
276278

279+
/**
280+
* If the document is in the index_status of
281+
* `parsing_failed or `indexing_failed`, then this endpoint allows you to update the index status to `not_parsed`and`not_indexed`,
282+
* respectively. This allows the document to re-attempt to parse/index after
283+
* failure.
284+
*/
285+
index_status?: 'not_parsed' | 'not_indexed' | null;
286+
277287
/**
278288
* If this field is provided, the given metadata json will replace the document's
279289
* existing metadata json. In other words, if you want to add a new field, you will

src/resources/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
export { Admin, type AdminCreateOrganizationResponse, type AdminCreateOrganizationParams } from './admin';
43
export {
54
Collections,
65
type CollectionDeleteResponse,
@@ -26,7 +25,7 @@ export {
2625
type DocumentGetInfoListParams,
2726
type DocumentGetPageInfoParams,
2827
} from './documents';
29-
export { Parsers, type ParserParseDocumentResponse, type ParserParseDocumentParams } from './parsers';
28+
export { Models, type ModelRerankResponse, type ModelRerankParams } from './models';
3029
export {
3130
Queries,
3231
type QueryTopDocumentsResponse,

src/resources/models.ts

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
import { APIResource } from '../resource';
4+
import * as Core from '../core';
5+
6+
export class Models extends APIResource {
7+
/**
8+
* Reranks the provided documents, according to the provided query.
9+
*
10+
* The results will be sorted by descending order of relevance. For each document,
11+
* the index and the score will be returned. The index is relative to the documents
12+
* array that was passed in. The score is the query-document relevancy determined
13+
* by the reranker model. The value will be returned in descending order to
14+
* relevance.
15+
*/
16+
rerank(body: ModelRerankParams, options?: Core.RequestOptions): Core.APIPromise<ModelRerankResponse> {
17+
return this._client.post('/models/rerank', { body, ...options });
18+
}
19+
}
20+
21+
export interface ModelRerankResponse {
22+
/**
23+
* The results, ordered by descending order of relevance to the query.
24+
*/
25+
results: Array<ModelRerankResponse.Result>;
26+
}
27+
28+
export namespace ModelRerankResponse {
29+
export interface Result {
30+
/**
31+
* The index of this document, relative to the original document array passed into
32+
* the request.
33+
*/
34+
index: number;
35+
36+
/**
37+
* The relevance score between this document and the query. This number will range
38+
* between 0.0 and 1.0. This score is dependent on only the query and the scored
39+
* document; other documents do not affect this score. This value is deterministic,
40+
* but may vary slightly due to floating point error.
41+
*/
42+
relevance_score: number;
43+
}
44+
}
45+
46+
export interface ModelRerankParams {
47+
/**
48+
* The list of documents to rerank. Each document is a string.
49+
*/
50+
documents: Array<string>;
51+
52+
/**
53+
* The query to rerank the documents by. Results will be in descending order of
54+
* relevance.
55+
*/
56+
query: string;
57+
58+
/**
59+
* The model ID to use for reranking. Options are: ["zerank-1-large"]
60+
*/
61+
model?: string;
62+
63+
/**
64+
* If provided, then only the top `n` documents will be returned in the results
65+
* array.
66+
*/
67+
top_n?: number | null;
68+
}
69+
70+
export declare namespace Models {
71+
export { type ModelRerankResponse as ModelRerankResponse, type ModelRerankParams as ModelRerankParams };
72+
}

0 commit comments

Comments
 (0)