Skip to content

Commit cfb7ab4

Browse files
release: 0.13.0 (#169)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent e04286d commit cfb7ab4

9 files changed

+48
-22
lines changed

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.12.0"
2+
".": "0.13.0"
33
}

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-8bf31041292f851076489c3ac1270d06c49b995225d91cf5de2288a4bcfa8c29.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-c5b2589925cd383cce5899869bbccbce45a90bd7c7c9608a4a9d087a88be9f4a.yml

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## 0.13.0 (2025-01-29)
4+
5+
Full Changelog: [v0.12.0...v0.13.0](https://github.com/groq/groq-typescript/compare/v0.12.0...v0.13.0)
6+
7+
### Features
8+
9+
* **api:** api update ([#172](https://github.com/groq/groq-typescript/issues/172)) ([f48946a](https://github.com/groq/groq-typescript/commit/f48946a46fccd5313565db3cac6143f536a4c5db))
10+
11+
12+
### Chores
13+
14+
* **internal:** codegen related update ([#168](https://github.com/groq/groq-typescript/issues/168)) ([4d7399b](https://github.com/groq/groq-typescript/commit/4d7399bf51707ebbcdf43897fdd0d3abdfb8db7c))
15+
* **internal:** codegen related update ([#170](https://github.com/groq/groq-typescript/issues/170)) ([2f4ee26](https://github.com/groq/groq-typescript/commit/2f4ee26019b86c3769674d44d7cf3e43c250b6d3))
16+
* **internal:** codegen related update ([#171](https://github.com/groq/groq-typescript/issues/171)) ([99cf580](https://github.com/groq/groq-typescript/commit/99cf580cfdc334df24442319d0e56a4a1e8c7ceb))
17+
318
## 0.12.0 (2025-01-11)
419

520
Full Changelog: [v0.11.0...v0.12.0](https://github.com/groq/groq-typescript/compare/v0.11.0...v0.12.0)

package.json

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

src/index.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ export interface ClientOptions {
3636
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
3737
* much longer than this timeout before the promise succeeds or fails.
3838
*/
39-
timeout?: number;
39+
timeout?: number | undefined;
4040

4141
/**
4242
* An HTTP agent used to manage HTTP(S) connections.
4343
*
4444
* If not provided, an agent will be constructed by default in the Node.js environment,
4545
* otherwise no agent is used.
4646
*/
47-
httpAgent?: Agent;
47+
httpAgent?: Agent | undefined;
4848

4949
/**
5050
* Specify a custom `fetch` function implementation.
@@ -60,29 +60,29 @@ export interface ClientOptions {
6060
*
6161
* @default 2
6262
*/
63-
maxRetries?: number;
63+
maxRetries?: number | undefined;
6464

6565
/**
6666
* Default headers to include with every request to the API.
6767
*
6868
* These can be removed in individual requests by explicitly setting the
6969
* header to `undefined` or `null` in request options.
7070
*/
71-
defaultHeaders?: Core.Headers;
71+
defaultHeaders?: Core.Headers | undefined;
7272

7373
/**
7474
* Default query parameters to include with every request to the API.
7575
*
7676
* These can be removed in individual requests by explicitly setting the
7777
* param to `undefined` in request options.
7878
*/
79-
defaultQuery?: Core.DefaultQuery;
79+
defaultQuery?: Core.DefaultQuery | undefined;
8080

8181
/**
8282
* By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers.
8383
* Only set this option to `true` if you understand the risks and have appropriate mitigations in place.
8484
*/
85-
dangerouslyAllowBrowser?: boolean;
85+
dangerouslyAllowBrowser?: boolean | undefined;
8686
}
8787

8888
/**

src/resources/chat/completions.ts

+17-12
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ export interface ChatCompletionAssistantMessageParam {
132132
content?: string | null;
133133

134134
/**
135-
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
136-
* a function that should be called, as generated by the model.
135+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
136+
* function that should be called, as generated by the model.
137137
*/
138138
function_call?: ChatCompletionAssistantMessageParam.FunctionCall;
139139

@@ -151,8 +151,8 @@ export interface ChatCompletionAssistantMessageParam {
151151

152152
export namespace ChatCompletionAssistantMessageParam {
153153
/**
154-
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
155-
* a function that should be called, as generated by the model.
154+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
155+
* function that should be called, as generated by the model.
156156
*/
157157
export interface FunctionCall {
158158
/**
@@ -249,8 +249,8 @@ export namespace ChatCompletionChunk {
249249
content?: string | null;
250250

251251
/**
252-
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
253-
* a function that should be called, as generated by the model.
252+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
253+
* function that should be called, as generated by the model.
254254
*/
255255
function_call?: Delta.FunctionCall;
256256

@@ -264,8 +264,8 @@ export namespace ChatCompletionChunk {
264264

265265
export namespace Delta {
266266
/**
267-
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
268-
* a function that should be called, as generated by the model.
267+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
268+
* function that should be called, as generated by the model.
269269
*/
270270
export interface FunctionCall {
271271
/**
@@ -429,8 +429,8 @@ export interface ChatCompletionMessage {
429429
role: 'assistant';
430430

431431
/**
432-
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
433-
* a function that should be called, as generated by the model.
432+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
433+
* function that should be called, as generated by the model.
434434
*/
435435
function_call?: ChatCompletionMessage.FunctionCall;
436436

@@ -442,8 +442,8 @@ export interface ChatCompletionMessage {
442442

443443
export namespace ChatCompletionMessage {
444444
/**
445-
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
446-
* a function that should be called, as generated by the model.
445+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
446+
* function that should be called, as generated by the model.
447447
*/
448448
export interface FunctionCall {
449449
/**
@@ -750,6 +750,11 @@ export interface ChatCompletionCreateParamsBase {
750750
*/
751751
presence_penalty?: number | null;
752752

753+
/**
754+
* Specifies how to output reasoning tokens
755+
*/
756+
reasoning_format?: 'hidden' | 'raw' | 'parsed' | null;
757+
753758
/**
754759
* An object specifying the format that the model must output.
755760
*

src/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '0.12.0'; // x-release-please-version
1+
export const VERSION = '0.13.0'; // x-release-please-version

tests/api-resources/chat/completions.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ describe('resource completions', () => {
3737
n: 1,
3838
parallel_tool_calls: true,
3939
presence_penalty: -2,
40+
reasoning_format: 'hidden',
4041
response_format: { type: 'text' },
4142
seed: 0,
4243
service_tier: 'auto',

tests/index.test.ts

+5
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ describe('instantiate client', () => {
9696
expect(response).toEqual({ url: 'http://localhost:5000/foo', custom: true });
9797
});
9898

99+
test('explicit global fetch', async () => {
100+
// make sure the global fetch type is assignable to our Fetch type
101+
const client = new Groq({ baseURL: 'http://localhost:5000/', apiKey: 'My API Key', fetch: defaultFetch });
102+
});
103+
99104
test('custom signal', async () => {
100105
const client = new Groq({
101106
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',

0 commit comments

Comments
 (0)