Skip to content

release: 0.26.0 #243

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
merged 5 commits into from
May 29, 2025
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.25.0"
".": "0.26.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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.26.0 (2025-05-29)

Full Changelog: [v0.25.0...v0.26.0](https://github.com/groq/groq-python/compare/v0.25.0...v0.26.0)

### Features

* **api:** api update ([52000cb](https://github.com/groq/groq-python/commit/52000cb906e1163c589a4000f916da979d3da50b))
* **api:** api update ([6718a54](https://github.com/groq/groq-python/commit/6718a549eeaefb681dea7a0494cbeb1480461281))


### Chores

* **docs:** grammar improvements ([b5f3b46](https://github.com/groq/groq-python/commit/b5f3b462124c56b1360027f1b86aa4ea9fc189f1))

## 0.25.0 (2025-05-16)

Full Changelog: [v0.24.0...v0.25.0](https://github.com/groq/groq-python/compare/v0.24.0...v0.25.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 support@groq.com for any questions or concerns regarding security of our services.
Please contact support@groq.com for any questions or concerns regarding the security of our services.

---

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "groq"
version = "0.25.0"
version = "0.26.0"
description = "The official Python library for the groq API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/groq/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "groq"
__version__ = "0.25.0" # x-release-please-version
__version__ = "0.26.0" # x-release-please-version
22 changes: 16 additions & 6 deletions src/groq/resources/audio/speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def create(
input: str,
model: Union[str, Literal["playai-tts", "playai-tts-arabic"]],
voice: str,
response_format: Literal["wav", "mp3"] | NotGiven = NOT_GIVEN,
response_format: Literal["flac", "mp3", "mulaw", "ogg", "wav"] | NotGiven = NOT_GIVEN,
sample_rate: Literal[8000, 16000, 22050, 24000, 32000, 44100, 48000] | NotGiven = NOT_GIVEN,
speed: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -73,9 +74,12 @@ def create(
voice: The voice to use when generating the audio. List of voices can be found
[here](/docs/text-to-speech).

response_format: The format to audio in. Supported formats are `wav, mp3`.
response_format: The format of the generated audio. Supported formats are
`flac, mp3, mulaw, ogg, wav`.

speed: The speed of the generated audio. 1.0 is the only supported value.
sample_rate: The sample rate for generated audio

speed: The speed of the generated audio.

extra_headers: Send extra headers

Expand All @@ -94,6 +98,7 @@ def create(
"model": model,
"voice": voice,
"response_format": response_format,
"sample_rate": sample_rate,
"speed": speed,
},
speech_create_params.SpeechCreateParams,
Expand Down Expand Up @@ -131,7 +136,8 @@ async def create(
input: str,
model: Union[str, Literal["playai-tts", "playai-tts-arabic"]],
voice: str,
response_format: Literal["wav", "mp3"] | NotGiven = NOT_GIVEN,
response_format: Literal["flac", "mp3", "mulaw", "ogg", "wav"] | NotGiven = NOT_GIVEN,
sample_rate: Literal[8000, 16000, 22050, 24000, 32000, 44100, 48000] | NotGiven = NOT_GIVEN,
speed: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -151,9 +157,12 @@ async def create(
voice: The voice to use when generating the audio. List of voices can be found
[here](/docs/text-to-speech).

response_format: The format to audio in. Supported formats are `wav, mp3`.
response_format: The format of the generated audio. Supported formats are
`flac, mp3, mulaw, ogg, wav`.

sample_rate: The sample rate for generated audio

speed: The speed of the generated audio. 1.0 is the only supported value.
speed: The speed of the generated audio.

extra_headers: Send extra headers

Expand All @@ -172,6 +181,7 @@ async def create(
"model": model,
"voice": voice,
"response_format": response_format,
"sample_rate": sample_rate,
"speed": speed,
},
speech_create_params.SpeechCreateParams,
Expand Down
12 changes: 9 additions & 3 deletions src/groq/types/audio/speech_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ class SpeechCreateParams(TypedDict, total=False):
List of voices can be found [here](/docs/text-to-speech).
"""

response_format: Literal["wav", "mp3"]
"""The format to audio in. Supported formats are `wav, mp3`."""
response_format: Literal["flac", "mp3", "mulaw", "ogg", "wav"]
"""The format of the generated audio.

Supported formats are `flac, mp3, mulaw, ogg, wav`.
"""

sample_rate: Literal[8000, 16000, 22050, 24000, 32000, 44100, 48000]
"""The sample rate for generated audio"""

speed: float
"""The speed of the generated audio. 1.0 is the only supported value."""
"""The speed of the generated audio."""
12 changes: 12 additions & 0 deletions src/groq/types/chat/chat_completion_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,21 @@
__all__ = [
"ChatCompletionMessage",
"ExecutedTool",
"ExecutedToolCodeResult",
"ExecutedToolSearchResults",
"ExecutedToolSearchResultsResult",
"FunctionCall",
]


class ExecutedToolCodeResult(BaseModel):
png: Optional[str] = None
"""Base64 encoded PNG image output from code execution"""

text: Optional[str] = None
"""The text version of the code execution result"""


class ExecutedToolSearchResultsResult(BaseModel):
content: Optional[str] = None
"""The content of the search result"""
Expand Down Expand Up @@ -47,6 +56,9 @@ class ExecutedTool(BaseModel):
type: str
"""The type of tool that was executed."""

code_results: Optional[List[ExecutedToolCodeResult]] = None
"""Array of code execution results"""

output: Optional[str] = None
"""The output returned by the tool."""

Expand Down
3 changes: 1 addition & 2 deletions src/groq/types/chat/completion_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,7 @@ class ResponseFormatResponseFormatJsonSchemaJsonSchema(TypedDict, total=False):

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).
`true`.
"""


Expand Down
6 changes: 4 additions & 2 deletions tests/api_resources/audio/test_speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def test_method_create_with_all_params(self, client: Groq, respx_mock: MockRoute
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,
)
assert speech.is_closed
Expand Down Expand Up @@ -113,7 +114,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncGroq, resp
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,
)
assert speech.is_closed
Expand Down