Skip to content

release: 0.23.0 #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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.22.0"
".": "0.23.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-ee34f94100e35d728e92c54940b84a46f420f476a4b82a33a21728ebf1e9032f.yml
openapi_spec_hash: 5d642c8432d9963281e7db786c2b4e6c
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-a2ddf0c5cb796758690f28d02fef6ae46d2eab3fdc3e2d2cf99ef2b75cca4022.yml
openapi_spec_hash: 0f3cd640ddd5f1f4e8ea20b9cfd86025
config_hash: 6b1c374dcc1ffa3165dd22f52a77ff89
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 0.23.0 (2025-05-29)

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

### Features

* **api:** api update ([527632f](https://github.com/groq/groq-typescript/commit/527632fca9ab7589cef1b1eb9e74da6645706433))
* **api:** api update ([478f2e8](https://github.com/groq/groq-typescript/commit/478f2e8ab8f0c07fe5ae192d00c843b47f78bd6c))
* **api:** api update ([f25c88a](https://github.com/groq/groq-typescript/commit/f25c88a35d599425abe1e8b53951b4be1066eab5))


### Chores

* **docs:** grammar improvements ([bd25707](https://github.com/groq/groq-typescript/commit/bd25707f2a699527fb7f8ea9f055e3ef040f29c6))
* improve publish-npm script --latest tag logic ([40719b5](https://github.com/groq/groq-typescript/commit/40719b543d3cde8a62fb6366ee4fc5f1a1ffa028))

## 0.22.0 (2025-05-16)

Full Changelog: [v0.21.0...v0.22.0](https://github.com/groq/groq-typescript/compare/v0.21.0...v0.22.0)
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ before making any information public.
## Reporting Non-SDK Related Security Issues

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

### Groq Terms and Policies

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

---

Expand Down
30 changes: 23 additions & 7 deletions bin/publish-npm
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,35 @@ set -eux

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

# Build the project
yarn build

# Navigate to the dist directory
cd dist

# Get the version from package.json
# Get latest version from npm
#
# If the package doesn't exist, yarn will return
# {"type":"error","data":"Received invalid response from npm."}
# where .data.version doesn't exist so LAST_VERSION will be an empty string.
LAST_VERSION="$(yarn info --json 2> /dev/null | jq -r '.data.version')"

# Get current version from package.json
VERSION="$(node -p "require('./package.json').version")"

# Extract the pre-release tag if it exists
# Check if current version is pre-release (e.g. alpha / beta / rc)
CURRENT_IS_PRERELEASE=false
if [[ "$VERSION" =~ -([a-zA-Z]+) ]]; then
# Extract the part before any dot in the pre-release identifier
TAG="${BASH_REMATCH[1]}"
CURRENT_IS_PRERELEASE=true
CURRENT_TAG="${BASH_REMATCH[1]}"
fi

# Check if last version is a stable release
LAST_IS_STABLE_RELEASE=true
if [[ -z "$LAST_VERSION" || "$LAST_VERSION" =~ -([a-zA-Z]+) ]]; then
LAST_IS_STABLE_RELEASE=false
fi

# Use a corresponding alpha/beta tag if there already is a stable release and we're publishing a prerelease.
if $CURRENT_IS_PRERELEASE && $LAST_IS_STABLE_RELEASE; then
TAG="$CURRENT_TAG"
else
TAG="latest"
fi
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.22.0",
"version": "0.23.0",
"description": "The official TypeScript library for the Groq API",
"author": "Groq <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
12 changes: 9 additions & 3 deletions src/resources/audio/speech.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,18 @@ export interface SpeechCreateParams {
voice: string;

/**
* The format to audio in. Supported formats are `wav, mp3`.
* The format of the generated audio. Supported formats are
* `flac, mp3, mulaw, ogg, wav`.
*/
response_format?: 'wav' | 'mp3';
response_format?: 'flac' | 'mp3' | 'mulaw' | 'ogg' | 'wav';

/**
* The speed of the generated audio. 1.0 is the only supported value.
* The sample rate for generated audio
*/
sample_rate?: 8000 | 16000 | 22050 | 24000 | 32000 | 44100 | 48000;

/**
* The speed of the generated audio.
*/
speed?: number;
}
Expand Down
38 changes: 35 additions & 3 deletions src/resources/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ export namespace ChatCompletionChunk {
*/
type: string;

/**
* Array of code execution results
*/
code_results?: Array<ExecutedTool.CodeResult>;

/**
* The output returned by the tool.
*/
Expand All @@ -344,6 +349,18 @@ export namespace ChatCompletionChunk {
}

export namespace ExecutedTool {
export interface CodeResult {
/**
* Base64 encoded PNG image output from code execution
*/
png?: string;

/**
* The text version of the code execution result
*/
text?: string;
}

/**
* The search results returned by the tool, if applicable.
*/
Expand Down Expand Up @@ -623,6 +640,11 @@ export namespace ChatCompletionMessage {
*/
type: string;

/**
* Array of code execution results
*/
code_results?: Array<ExecutedTool.CodeResult>;

/**
* The output returned by the tool.
*/
Expand All @@ -635,6 +657,18 @@ export namespace ChatCompletionMessage {
}

export namespace ExecutedTool {
export interface CodeResult {
/**
* Base64 encoded PNG image output from code execution
*/
png?: string;

/**
* The text version of the code execution result
*/
text?: string;
}

/**
* The search results returned by the tool, if applicable.
*/
Expand Down Expand Up @@ -1200,9 +1234,7 @@ export namespace CompletionCreateParams {
/**
* Whether to enable strict schema adherence when generating the output. If set to
* true, the model will always follow the exact schema defined in the `schema`
* field. Only a subset of JSON Schema is supported when `strict` is `true`. To
* learn more, read the
* [Structured Outputs guide](/docs/guides/structured-outputs).
* field. Only a subset of JSON Schema is supported when `strict` is `true`.
*/
strict?: boolean | null;
}
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.22.0'; // x-release-please-version
export const VERSION = '0.23.0'; // x-release-please-version
3 changes: 2 additions & 1 deletion tests/api-resources/audio/speech.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ describe('resource speech', () => {
input: 'The quick brown fox jumped over the lazy dog',
model: 'playai-tts',
voice: 'Fritz-PlayAI',
response_format: 'wav',
response_format: 'flac',
sample_rate: 48000,
speed: 1,
});
});
Expand Down