Skip to content

Commit e55da1a

Browse files
release: 0.26.0 (#243)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent a5c9a20 commit e55da1a

File tree

11 files changed

+63
-20
lines changed

11 files changed

+63
-20
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.25.0"
2+
".": "0.26.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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## 0.26.0 (2025-05-29)
4+
5+
Full Changelog: [v0.25.0...v0.26.0](https://github.com/groq/groq-python/compare/v0.25.0...v0.26.0)
6+
7+
### Features
8+
9+
* **api:** api update ([52000cb](https://github.com/groq/groq-python/commit/52000cb906e1163c589a4000f916da979d3da50b))
10+
* **api:** api update ([6718a54](https://github.com/groq/groq-python/commit/6718a549eeaefb681dea7a0494cbeb1480461281))
11+
12+
13+
### Chores
14+
15+
* **docs:** grammar improvements ([b5f3b46](https://github.com/groq/groq-python/commit/b5f3b462124c56b1360027f1b86aa4ea9fc189f1))
16+
317
## 0.25.0 (2025-05-16)
418

519
Full Changelog: [v0.24.0...v0.25.0](https://github.com/groq/groq-python/compare/v0.24.0...v0.25.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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "groq"
3-
version = "0.25.0"
3+
version = "0.26.0"
44
description = "The official Python library for the groq API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/groq/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "groq"
4-
__version__ = "0.25.0" # x-release-please-version
4+
__version__ = "0.26.0" # x-release-please-version

src/groq/resources/audio/speech.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def create(
5353
input: str,
5454
model: Union[str, Literal["playai-tts", "playai-tts-arabic"]],
5555
voice: str,
56-
response_format: Literal["wav", "mp3"] | NotGiven = NOT_GIVEN,
56+
response_format: Literal["flac", "mp3", "mulaw", "ogg", "wav"] | NotGiven = NOT_GIVEN,
57+
sample_rate: Literal[8000, 16000, 22050, 24000, 32000, 44100, 48000] | NotGiven = NOT_GIVEN,
5758
speed: float | NotGiven = NOT_GIVEN,
5859
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5960
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -73,9 +74,12 @@ def create(
7374
voice: The voice to use when generating the audio. List of voices can be found
7475
[here](/docs/text-to-speech).
7576
76-
response_format: The format to audio in. Supported formats are `wav, mp3`.
77+
response_format: The format of the generated audio. Supported formats are
78+
`flac, mp3, mulaw, ogg, wav`.
7779
78-
speed: The speed of the generated audio. 1.0 is the only supported value.
80+
sample_rate: The sample rate for generated audio
81+
82+
speed: The speed of the generated audio.
7983
8084
extra_headers: Send extra headers
8185
@@ -94,6 +98,7 @@ def create(
9498
"model": model,
9599
"voice": voice,
96100
"response_format": response_format,
101+
"sample_rate": sample_rate,
97102
"speed": speed,
98103
},
99104
speech_create_params.SpeechCreateParams,
@@ -131,7 +136,8 @@ async def create(
131136
input: str,
132137
model: Union[str, Literal["playai-tts", "playai-tts-arabic"]],
133138
voice: str,
134-
response_format: Literal["wav", "mp3"] | NotGiven = NOT_GIVEN,
139+
response_format: Literal["flac", "mp3", "mulaw", "ogg", "wav"] | NotGiven = NOT_GIVEN,
140+
sample_rate: Literal[8000, 16000, 22050, 24000, 32000, 44100, 48000] | NotGiven = NOT_GIVEN,
135141
speed: float | NotGiven = NOT_GIVEN,
136142
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
137143
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -151,9 +157,12 @@ async def create(
151157
voice: The voice to use when generating the audio. List of voices can be found
152158
[here](/docs/text-to-speech).
153159
154-
response_format: The format to audio in. Supported formats are `wav, mp3`.
160+
response_format: The format of the generated audio. Supported formats are
161+
`flac, mp3, mulaw, ogg, wav`.
162+
163+
sample_rate: The sample rate for generated audio
155164
156-
speed: The speed of the generated audio. 1.0 is the only supported value.
165+
speed: The speed of the generated audio.
157166
158167
extra_headers: Send extra headers
159168
@@ -172,6 +181,7 @@ async def create(
172181
"model": model,
173182
"voice": voice,
174183
"response_format": response_format,
184+
"sample_rate": sample_rate,
175185
"speed": speed,
176186
},
177187
speech_create_params.SpeechCreateParams,

src/groq/types/audio/speech_create_params.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ class SpeechCreateParams(TypedDict, total=False):
2121
List of voices can be found [here](/docs/text-to-speech).
2222
"""
2323

24-
response_format: Literal["wav", "mp3"]
25-
"""The format to audio in. Supported formats are `wav, mp3`."""
24+
response_format: Literal["flac", "mp3", "mulaw", "ogg", "wav"]
25+
"""The format of the generated audio.
26+
27+
Supported formats are `flac, mp3, mulaw, ogg, wav`.
28+
"""
29+
30+
sample_rate: Literal[8000, 16000, 22050, 24000, 32000, 44100, 48000]
31+
"""The sample rate for generated audio"""
2632

2733
speed: float
28-
"""The speed of the generated audio. 1.0 is the only supported value."""
34+
"""The speed of the generated audio."""

src/groq/types/chat/chat_completion_message.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,21 @@
99
__all__ = [
1010
"ChatCompletionMessage",
1111
"ExecutedTool",
12+
"ExecutedToolCodeResult",
1213
"ExecutedToolSearchResults",
1314
"ExecutedToolSearchResultsResult",
1415
"FunctionCall",
1516
]
1617

1718

19+
class ExecutedToolCodeResult(BaseModel):
20+
png: Optional[str] = None
21+
"""Base64 encoded PNG image output from code execution"""
22+
23+
text: Optional[str] = None
24+
"""The text version of the code execution result"""
25+
26+
1827
class ExecutedToolSearchResultsResult(BaseModel):
1928
content: Optional[str] = None
2029
"""The content of the search result"""
@@ -47,6 +56,9 @@ class ExecutedTool(BaseModel):
4756
type: str
4857
"""The type of tool that was executed."""
4958

59+
code_results: Optional[List[ExecutedToolCodeResult]] = None
60+
"""Array of code execution results"""
61+
5062
output: Optional[str] = None
5163
"""The output returned by the tool."""
5264

src/groq/types/chat/completion_create_params.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,7 @@ class ResponseFormatResponseFormatJsonSchemaJsonSchema(TypedDict, total=False):
293293
294294
If set to true, the model will always follow the exact schema defined in the
295295
`schema` field. Only a subset of JSON Schema is supported when `strict` is
296-
`true`. To learn more, read the
297-
[Structured Outputs guide](/docs/guides/structured-outputs).
296+
`true`.
298297
"""
299298

300299

tests/api_resources/audio/test_speech.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ def test_method_create_with_all_params(self, client: Groq, respx_mock: MockRoute
4545
input="The quick brown fox jumped over the lazy dog",
4646
model="playai-tts",
4747
voice="Fritz-PlayAI",
48-
response_format="wav",
48+
response_format="flac",
49+
sample_rate=48000,
4950
speed=1,
5051
)
5152
assert speech.is_closed
@@ -113,7 +114,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncGroq, resp
113114
input="The quick brown fox jumped over the lazy dog",
114115
model="playai-tts",
115116
voice="Fritz-PlayAI",
116-
response_format="wav",
117+
response_format="flac",
118+
sample_rate=48000,
117119
speed=1,
118120
)
119121
assert speech.is_closed

0 commit comments

Comments
 (0)