Skip to content

Commit 5fc84a4

Browse files
release: 0.23.0 (#228)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 321bbcf commit 5fc84a4

File tree

10 files changed

+92
-21
lines changed

10 files changed

+92
-21
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.22.0"
2+
".": "0.23.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 17
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-ee34f94100e35d728e92c54940b84a46f420f476a4b82a33a21728ebf1e9032f.yml
3-
openapi_spec_hash: 5d642c8432d9963281e7db786c2b4e6c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-a2ddf0c5cb796758690f28d02fef6ae46d2eab3fdc3e2d2cf99ef2b75cca4022.yml
3+
openapi_spec_hash: 0f3cd640ddd5f1f4e8ea20b9cfd86025
44
config_hash: 6b1c374dcc1ffa3165dd22f52a77ff89

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## 0.23.0 (2025-05-29)
4+
5+
Full Changelog: [v0.22.0...v0.23.0](https://github.com/groq/groq-typescript/compare/v0.22.0...v0.23.0)
6+
7+
### Features
8+
9+
* **api:** api update ([527632f](https://github.com/groq/groq-typescript/commit/527632fca9ab7589cef1b1eb9e74da6645706433))
10+
* **api:** api update ([478f2e8](https://github.com/groq/groq-typescript/commit/478f2e8ab8f0c07fe5ae192d00c843b47f78bd6c))
11+
* **api:** api update ([f25c88a](https://github.com/groq/groq-typescript/commit/f25c88a35d599425abe1e8b53951b4be1066eab5))
12+
13+
14+
### Chores
15+
16+
* **docs:** grammar improvements ([bd25707](https://github.com/groq/groq-typescript/commit/bd25707f2a699527fb7f8ea9f055e3ef040f29c6))
17+
* improve publish-npm script --latest tag logic ([40719b5](https://github.com/groq/groq-typescript/commit/40719b543d3cde8a62fb6366ee4fc5f1a1ffa028))
18+
319
## 0.22.0 (2025-05-16)
420

521
Full Changelog: [v0.21.0...v0.22.0](https://github.com/groq/groq-typescript/compare/v0.21.0...v0.22.0)

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by Groq please follow the respective company's security reporting guidelines.
19+
or products provided by Groq, please follow the respective company's security reporting guidelines.
2020

2121
### Groq Terms and Policies
2222

23-
Please contact [email protected] for any questions or concerns regarding security of our services.
23+
Please contact [email protected] for any questions or concerns regarding the security of our services.
2424

2525
---
2626

bin/publish-npm

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,35 @@ set -eux
44

55
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
66

7-
# Build the project
87
yarn build
9-
10-
# Navigate to the dist directory
118
cd dist
129

13-
# Get the version from package.json
10+
# Get latest version from npm
11+
#
12+
# If the package doesn't exist, yarn will return
13+
# {"type":"error","data":"Received invalid response from npm."}
14+
# where .data.version doesn't exist so LAST_VERSION will be an empty string.
15+
LAST_VERSION="$(yarn info --json 2> /dev/null | jq -r '.data.version')"
16+
17+
# Get current version from package.json
1418
VERSION="$(node -p "require('./package.json').version")"
1519

16-
# Extract the pre-release tag if it exists
20+
# Check if current version is pre-release (e.g. alpha / beta / rc)
21+
CURRENT_IS_PRERELEASE=false
1722
if [[ "$VERSION" =~ -([a-zA-Z]+) ]]; then
18-
# Extract the part before any dot in the pre-release identifier
19-
TAG="${BASH_REMATCH[1]}"
23+
CURRENT_IS_PRERELEASE=true
24+
CURRENT_TAG="${BASH_REMATCH[1]}"
25+
fi
26+
27+
# Check if last version is a stable release
28+
LAST_IS_STABLE_RELEASE=true
29+
if [[ -z "$LAST_VERSION" || "$LAST_VERSION" =~ -([a-zA-Z]+) ]]; then
30+
LAST_IS_STABLE_RELEASE=false
31+
fi
32+
33+
# Use a corresponding alpha/beta tag if there already is a stable release and we're publishing a prerelease.
34+
if $CURRENT_IS_PRERELEASE && $LAST_IS_STABLE_RELEASE; then
35+
TAG="$CURRENT_TAG"
2036
else
2137
TAG="latest"
2238
fi

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "groq-sdk",
3-
"version": "0.22.0",
3+
"version": "0.23.0",
44
"description": "The official TypeScript library for the Groq API",
55
"author": "Groq <[email protected]>",
66
"types": "dist/index.d.ts",

src/resources/audio/speech.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,18 @@ export interface SpeechCreateParams {
4848
voice: string;
4949

5050
/**
51-
* The format to audio in. Supported formats are `wav, mp3`.
51+
* The format of the generated audio. Supported formats are
52+
* `flac, mp3, mulaw, ogg, wav`.
5253
*/
53-
response_format?: 'wav' | 'mp3';
54+
response_format?: 'flac' | 'mp3' | 'mulaw' | 'ogg' | 'wav';
5455

5556
/**
56-
* The speed of the generated audio. 1.0 is the only supported value.
57+
* The sample rate for generated audio
58+
*/
59+
sample_rate?: 8000 | 16000 | 22050 | 24000 | 32000 | 44100 | 48000;
60+
61+
/**
62+
* The speed of the generated audio.
5763
*/
5864
speed?: number;
5965
}

src/resources/chat/completions.ts

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ export namespace ChatCompletionChunk {
332332
*/
333333
type: string;
334334

335+
/**
336+
* Array of code execution results
337+
*/
338+
code_results?: Array<ExecutedTool.CodeResult>;
339+
335340
/**
336341
* The output returned by the tool.
337342
*/
@@ -344,6 +349,18 @@ export namespace ChatCompletionChunk {
344349
}
345350

346351
export namespace ExecutedTool {
352+
export interface CodeResult {
353+
/**
354+
* Base64 encoded PNG image output from code execution
355+
*/
356+
png?: string;
357+
358+
/**
359+
* The text version of the code execution result
360+
*/
361+
text?: string;
362+
}
363+
347364
/**
348365
* The search results returned by the tool, if applicable.
349366
*/
@@ -623,6 +640,11 @@ export namespace ChatCompletionMessage {
623640
*/
624641
type: string;
625642

643+
/**
644+
* Array of code execution results
645+
*/
646+
code_results?: Array<ExecutedTool.CodeResult>;
647+
626648
/**
627649
* The output returned by the tool.
628650
*/
@@ -635,6 +657,18 @@ export namespace ChatCompletionMessage {
635657
}
636658

637659
export namespace ExecutedTool {
660+
export interface CodeResult {
661+
/**
662+
* Base64 encoded PNG image output from code execution
663+
*/
664+
png?: string;
665+
666+
/**
667+
* The text version of the code execution result
668+
*/
669+
text?: string;
670+
}
671+
638672
/**
639673
* The search results returned by the tool, if applicable.
640674
*/
@@ -1200,9 +1234,7 @@ export namespace CompletionCreateParams {
12001234
/**
12011235
* Whether to enable strict schema adherence when generating the output. If set to
12021236
* true, the model will always follow the exact schema defined in the `schema`
1203-
* field. Only a subset of JSON Schema is supported when `strict` is `true`. To
1204-
* learn more, read the
1205-
* [Structured Outputs guide](/docs/guides/structured-outputs).
1237+
* field. Only a subset of JSON Schema is supported when `strict` is `true`.
12061238
*/
12071239
strict?: boolean | null;
12081240
}

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '0.22.0'; // x-release-please-version
1+
export const VERSION = '0.23.0'; // x-release-please-version

tests/api-resources/audio/speech.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ describe('resource speech', () => {
1414
input: 'The quick brown fox jumped over the lazy dog',
1515
model: 'playai-tts',
1616
voice: 'Fritz-PlayAI',
17-
response_format: 'wav',
17+
response_format: 'flac',
18+
sample_rate: 48000,
1819
speed: 1,
1920
});
2021
});

0 commit comments

Comments
 (0)