diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0ee8c01..2537c1f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.3.0" + ".": "0.4.0" } diff --git a/.stats.yml b/.stats.yml index a8e67cf..3bf9ffe 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 46 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/contextual-ai%2Fsunrise-5298551c424bb999f258bdd6c311e96c80c70701ad59bbce19b46c788ee13bd4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/contextual-ai%2Fsunrise-f43814080090927ee22816c5c7f517d8a7eb7f346329ada67915608e32124321.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 553accf..1e09b2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.4.0 (2025-03-03) + +Full Changelog: [v0.3.0...v0.4.0](https://github.com/ContextualAI/contextual-client-node/compare/v0.3.0...v0.4.0) + +### Features + +* **api:** update via SDK Studio ([#31](https://github.com/ContextualAI/contextual-client-node/issues/31)) ([4ba5a46](https://github.com/ContextualAI/contextual-client-node/commit/4ba5a465a8201253d49b85cc8befd22f8ac721de)) + + +### Documentation + +* update URLs from stainlessapi.com to stainless.com ([#28](https://github.com/ContextualAI/contextual-client-node/issues/28)) ([ffbd533](https://github.com/ContextualAI/contextual-client-node/commit/ffbd5334f8d85c61dbce453e2fe86f0d4260621c)) + ## 0.3.0 (2025-02-26) Full Changelog: [v0.2.0...v0.3.0](https://github.com/ContextualAI/contextual-client-node/compare/v0.2.0...v0.3.0) diff --git a/SECURITY.md b/SECURITY.md index b8c9380..92a473f 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,9 +2,9 @@ ## Reporting Security Issues -This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken. +This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken. -To report a security issue, please contact the Stainless team at security@stainlessapi.com. +To report a security issue, please contact the Stainless team at security@stainless.com. ## Responsible Disclosure diff --git a/package.json b/package.json index be292d4..9f46c21 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "contextual-client", - "version": "0.3.0", + "version": "0.4.0", "description": "The official TypeScript library for the Contextual AI API", "author": "Contextual AI ", "types": "dist/index.d.ts", diff --git a/src/resources/agents/evaluate/jobs.ts b/src/resources/agents/evaluate/jobs.ts index 2c71fe9..5432d84 100644 --- a/src/resources/agents/evaluate/jobs.ts +++ b/src/resources/agents/evaluate/jobs.ts @@ -141,6 +141,11 @@ export namespace ListEvaluationJobsResponse { */ num_predictions?: number; + /** + * Number of predictions that have been processed during the evaluation round + */ + num_processed_predictions?: number; + /** * Number of predictions that were successful during the evaluation round */ diff --git a/src/resources/agents/query.ts b/src/resources/agents/query.ts index 3b9a623..827eafc 100644 --- a/src/resources/agents/query.ts +++ b/src/resources/agents/query.ts @@ -322,8 +322,7 @@ export interface QueryCreateParams { export namespace QueryCreateParams { /** - * Message object for a message sent or received in a /query and /generate - * conversation + * Message object for a message sent or received in a conversation */ export interface Message { /** diff --git a/src/resources/generate.ts b/src/resources/generate.ts index 67a5cfa..76cd1c6 100644 --- a/src/resources/generate.ts +++ b/src/resources/generate.ts @@ -53,17 +53,34 @@ export interface GenerateCreateParams { */ avoid_commentary?: boolean; + /** + * The maximum number of tokens that the model can generate in the response. + */ + max_new_tokens?: number; + /** * Instructions that the model follows when generating responses. Note that we do * not guarantee that the model follows these instructions exactly. */ system_prompt?: string; + + /** + * The sampling temperature, which affects the randomness in the response. Note + * that higher temperature values can reduce groundedness + */ + temperature?: number; + + /** + * A parameter for nucleus sampling, an alternative to temperature which also + * affects the randomness of the response. Note that higher top_p values can reduce + * groundedness + */ + top_p?: number; } export namespace GenerateCreateParams { /** - * Message object for a message sent or received in a /query and /generate - * conversation + * Message object for a message received in the /generate request */ export interface Message { /** @@ -74,7 +91,7 @@ export namespace GenerateCreateParams { /** * Role of the sender */ - role: 'user' | 'system' | 'assistant' | 'knowledge'; + role: 'user' | 'assistant'; } } diff --git a/src/version.ts b/src/version.ts index 88f4d40..4e7f788 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.3.0'; // x-release-please-version +export const VERSION = '0.4.0'; // x-release-please-version diff --git a/tests/api-resources/generate.test.ts b/tests/api-resources/generate.test.ts index 8088f80..123aabd 100644 --- a/tests/api-resources/generate.test.ts +++ b/tests/api-resources/generate.test.ts @@ -30,7 +30,10 @@ describe('resource generate', () => { messages: [{ content: 'content', role: 'user' }], model: 'model', avoid_commentary: true, + max_new_tokens: 1, system_prompt: 'system_prompt', + temperature: 0, + top_p: 1, }); }); });