Skip to content

Commit 67be5c7

Browse files
feat(api): update via SDK Studio (#40)
1 parent e93fa24 commit 67be5c7

File tree

5 files changed

+18
-25
lines changed

5 files changed

+18
-25
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/contextual-ai%2Fsunrise-194878b194cd507d7c5418ff38cc0fc53441ef618f991990d334b4b75775cd8f.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/contextual-ai%2Fsunrise-e20c18e11af76caf98794e68406fc556cf91d13e8e27a3b1d1909a4f8c2d3eb5.yml

src/resources/agents/query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ export namespace QueryCreateParams {
434434
* The value to be searched for in the field. In case of exists operator, it is not
435435
* needed.
436436
*/
437-
value?: string | number | boolean | Array<string | number | boolean> | null;
437+
value?: string | (string & {}) | number | boolean | Array<unknown> | Array<string | number | boolean>;
438438
}
439439
}
440440

src/resources/datastores/documents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export namespace CompositeMetadataFilter {
153153
* The value to be searched for in the field. In case of exists operator, it is not
154154
* needed.
155155
*/
156-
value?: string | number | boolean | Array<string | number | boolean> | null;
156+
value?: string | (string & {}) | number | boolean | Array<unknown> | Array<string | number | boolean>;
157157
}
158158
}
159159

src/resources/generate.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export interface GenerateCreateParams {
4444
messages: Array<GenerateCreateParams.Message>;
4545

4646
/**
47-
* The version of the Contextual's GLM to use. Currently, we just have "v1".
47+
* The version of the Contextual's GLM to use. Currently, we just have
48+
* "ctxl-rerank-en-v1-instruct".
4849
*/
4950
model: string;
5051

src/resources/rerank.ts

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@ import * as Core from '../core';
55

66
export class Rerank extends APIResource {
77
/**
8-
* Rank a list of documents according to their relevance to a query and your custom
9-
* instructions about how to prioritize retrievals. We evaluated the model on
10-
* instructions for recency, document type, source, and metadata, and it can
11-
* generalize to other instructions as well.
8+
* Rank a list of documents according to their relevance to a query.
129
*
13-
* The total request cannot exceed 400,000 tokens. The combined length of the
14-
* query, instruction and any document with its metadata must not exceed 8,000
15-
* tokens. Email
10+
* The total request cannot exceed 400,000 tokens. The combined length of any
11+
* document, instruction and the query must not exceed 4,000 tokens. Email
1612
1713
* feedback or questions.
1814
*/
@@ -56,14 +52,12 @@ export namespace RerankCreateResponse {
5652

5753
export interface RerankCreateParams {
5854
/**
59-
* The texts to be reranked according to their relevance to the query and the
60-
* optional instruction
55+
* The texts to be reranked according to their relevance to the query
6156
*/
6257
documents: Array<string>;
6358

6459
/**
65-
* The version of the reranker to use. Currently, we just have
66-
* "ctxl-rerank-en-v1-instruct".
60+
* The version of the reranker to use. Currently, we just have "v1".
6761
*/
6862
model: string;
6963

@@ -73,21 +67,19 @@ export interface RerankCreateParams {
7367
query: string;
7468

7569
/**
76-
* Instructions that the reranker references when ranking retrievals. We evaluated
77-
* the model on instructions for recency, document type, source, and metadata, and
78-
* it can generalize to other instructions as well. Note that we do not guarantee
79-
* that the reranker will follow these instructions exactly. Examples: "Prioritize
80-
* internal sales documents over market analysis reports. More recent documents
81-
* should be weighted higher. Enterprise portal content supersedes distributor
82-
* communications." and "Emphasize forecasts from top-tier investment banks. Recent
83-
* analysis should take precedence. Disregard aggregator sites and favor detailed
84-
* research notes over news summaries."
70+
* Instructions that the reranker references when ranking retrievals. Note that we
71+
* do not guarantee that the reranker will follow these instructions exactly.
72+
* Examples: "Prioritize internal sales documents over market analysis reports.
73+
* More recent documents should be weighted higher. Enterprise portal content
74+
* supersedes distributor communications." and "Emphasize forecasts from top-tier
75+
* investment banks. Recent analysis should take precedence. Disregard aggregator
76+
* sites and favor detailed research notes over news summaries."
8577
*/
8678
instruction?: string;
8779

8880
/**
8981
* Metadata for documents being passed to the reranker. Must be the same length as
90-
* the documents list. If a document does not have metadata, add an empty string.
82+
* the documents list.
9183
*/
9284
metadata?: Array<string>;
9385

0 commit comments

Comments
 (0)