From bca031417dfc044a8e5c2f0d847efe9a55f0ecbe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Oct 2025 00:10:16 +0000 Subject: [PATCH 1/3] feat(api): api update --- .stats.yml | 4 +- src/resources/chat/completions.ts | 140 ++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 72b127d..c2610a2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 17 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-498dee72535c9b0585491899c8e5173ac2b83676710c741ef41faef415821683.yml -openapi_spec_hash: aff11e3516f652d05f5416f6593994d1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-d992d797939cfe674a14745104fb3219af457d283b625d5599d11617acf447e0.yml +openapi_spec_hash: 7059cc4dcba4efaa4e14513b4f26f9ed config_hash: a4a6c3089a2e53425351cc9f42b4b5aa diff --git a/src/resources/chat/completions.ts b/src/resources/chat/completions.ts index 44acd66..6ddedf5 100644 --- a/src/resources/chat/completions.ts +++ b/src/resources/chat/completions.ts @@ -290,6 +290,12 @@ export namespace ChatCompletionChunk { * A chat completion delta generated by streamed model responses. */ export interface Delta { + /** + * A list of annotations providing citations and references for the content in the + * message. + */ + annotations?: Array; + /** * The contents of the chunk message. */ @@ -322,6 +328,70 @@ export namespace ChatCompletionChunk { } export namespace Delta { + /** + * An annotation that provides citations or references for content in a message. + */ + export interface Annotation { + /** + * The type of annotation. + */ + type: 'document_citation' | 'function_citation'; + + /** + * A citation referencing a specific document that was provided in the request. + */ + document_citation?: Annotation.DocumentCitation; + + /** + * A citation referencing the result of a function or tool call. + */ + function_citation?: Annotation.FunctionCitation; + } + + export namespace Annotation { + /** + * A citation referencing a specific document that was provided in the request. + */ + export interface DocumentCitation { + /** + * The ID of the document being cited, corresponding to a document provided in the + * request. + */ + document_id: string; + + /** + * The character index in the message content where this citation ends. + */ + end_index: number; + + /** + * The character index in the message content where this citation begins. + */ + start_index: number; + } + + /** + * A citation referencing the result of a function or tool call. + */ + export interface FunctionCitation { + /** + * The character index in the message content where this citation ends. + */ + end_index: number; + + /** + * The character index in the message content where this citation begins. + */ + start_index: number; + + /** + * The ID of the tool call being cited, corresponding to a tool call made during + * the conversation. + */ + tool_call_id: string; + } + } + export interface ExecutedTool { /** * The arguments passed to the tool in JSON format. @@ -897,6 +967,12 @@ export interface ChatCompletionMessage { */ role: 'assistant'; + /** + * A list of annotations providing citations and references for the content in the + * message. + */ + annotations?: Array; + /** * A list of tools that were executed during the chat completion for compound AI * systems. @@ -922,6 +998,70 @@ export interface ChatCompletionMessage { } export namespace ChatCompletionMessage { + /** + * An annotation that provides citations or references for content in a message. + */ + export interface Annotation { + /** + * The type of annotation. + */ + type: 'document_citation' | 'function_citation'; + + /** + * A citation referencing a specific document that was provided in the request. + */ + document_citation?: Annotation.DocumentCitation; + + /** + * A citation referencing the result of a function or tool call. + */ + function_citation?: Annotation.FunctionCitation; + } + + export namespace Annotation { + /** + * A citation referencing a specific document that was provided in the request. + */ + export interface DocumentCitation { + /** + * The ID of the document being cited, corresponding to a document provided in the + * request. + */ + document_id: string; + + /** + * The character index in the message content where this citation ends. + */ + end_index: number; + + /** + * The character index in the message content where this citation begins. + */ + start_index: number; + } + + /** + * A citation referencing the result of a function or tool call. + */ + export interface FunctionCitation { + /** + * The character index in the message content where this citation ends. + */ + end_index: number; + + /** + * The character index in the message content where this citation begins. + */ + start_index: number; + + /** + * The ID of the tool call being cited, corresponding to a tool call made during + * the conversation. + */ + tool_call_id: string; + } + } + export interface ExecutedTool { /** * The arguments passed to the tool in JSON format. From f3044902434d7e9971ad087756bcc1928e49962f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 19:34:11 +0000 Subject: [PATCH 2/3] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c2610a2..17ecc23 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 17 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-d992d797939cfe674a14745104fb3219af457d283b625d5599d11617acf447e0.yml -openapi_spec_hash: 7059cc4dcba4efaa4e14513b4f26f9ed +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-5d2697ad30ccbbd1502ade612deb9221a1e05e70d09a156da743d0ca120942f9.yml +openapi_spec_hash: 0bde05b560fbd40711e91e6b562c3b0f config_hash: a4a6c3089a2e53425351cc9f42b4b5aa From 02b6d9a604e338fe3541e97b360f2dae5ba1c665 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 19:34:27 +0000 Subject: [PATCH 3/3] release: 0.35.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8878352..3a39fd8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.34.0" + ".": "0.35.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index b1d8602..e13aafa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.35.0 (2025-11-05) + +Full Changelog: [v0.34.0...v0.35.0](https://github.com/groq/groq-typescript/compare/v0.34.0...v0.35.0) + +### Features + +* **api:** api update ([bca0314](https://github.com/groq/groq-typescript/commit/bca031417dfc044a8e5c2f0d847efe9a55f0ecbe)) + ## 0.34.0 (2025-10-16) Full Changelog: [v0.33.0...v0.34.0](https://github.com/groq/groq-typescript/compare/v0.33.0...v0.34.0) diff --git a/package.json b/package.json index 7772fce..a8156a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "groq-sdk", - "version": "0.34.0", + "version": "0.35.0", "description": "The official TypeScript library for the Groq API", "author": "Groq ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 4819998..3f1d432 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.34.0'; // x-release-please-version +export const VERSION = '0.35.0'; // x-release-please-version