Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.3.0"
".": "0.4.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <support@contextual.ai>",
"types": "dist/index.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions src/resources/agents/evaluate/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
3 changes: 1 addition & 2 deletions src/resources/agents/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand Down
23 changes: 20 additions & 3 deletions src/resources/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand All @@ -74,7 +91,7 @@ export namespace GenerateCreateParams {
/**
* Role of the sender
*/
role: 'user' | 'system' | 'assistant' | 'knowledge';
role: 'user' | 'assistant';
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.3.0'; // x-release-please-version
export const VERSION = '0.4.0'; // x-release-please-version
3 changes: 3 additions & 0 deletions tests/api-resources/generate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
});
});