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.34.0"
".": "0.35.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -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-5d2697ad30ccbbd1502ade612deb9221a1e05e70d09a156da743d0ca120942f9.yml
openapi_spec_hash: 0bde05b560fbd40711e91e6b562c3b0f
config_hash: a4a6c3089a2e53425351cc9f42b4b5aa
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
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": "groq-sdk",
"version": "0.34.0",
"version": "0.35.0",
"description": "The official TypeScript library for the Groq API",
"author": "Groq <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
140 changes: 140 additions & 0 deletions src/resources/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Delta.Annotation>;

/**
* The contents of the chunk message.
*/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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<ChatCompletionMessage.Annotation>;

/**
* A list of tools that were executed during the chat completion for compound AI
* systems.
Expand All @@ -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.
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.34.0'; // x-release-please-version
export const VERSION = '0.35.0'; // x-release-please-version