Skip to content

Commit e1280b2

Browse files
release: 0.24.0 (#240)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Graden Rea <[email protected]>
1 parent ab7fe20 commit e1280b2

File tree

8 files changed

+66
-5
lines changed

8 files changed

+66
-5
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.23.1"
2+
".": "0.24.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-37498d19ece87c6866fe2460cef019b42d73c598d3489925375484812ce9b5a5.yml
3-
openapi_spec_hash: 009dde3080daf9a27d5165245e4ad11d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-e4cd6fe4e6ac62707635fac8fb7d966a0360868e467b578ddd7cc04a9459ff26.yml
3+
openapi_spec_hash: e618e809624bb2f3b36995638c3ba791
44
config_hash: 6b1c374dcc1ffa3165dd22f52a77ff89

CHANGELOG.md

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

3+
## 0.24.0 (2025-05-02)
4+
5+
Full Changelog: [v0.23.1...v0.24.0](https://github.com/groq/groq-python/compare/v0.23.1...v0.24.0)
6+
7+
### Features
8+
9+
* **api:** api update ([e65ff4d](https://github.com/groq/groq-python/commit/e65ff4d299fd612b6ce04e5cf5544b93bbc45297))
10+
11+
12+
### Bug Fixes
13+
14+
* add include/exclude_domains to all chat completions overloads ([7616f4b](https://github.com/groq/groq-python/commit/7616f4b2e91db267a6afe0700511b324471f9983))
15+
316
## 0.23.1 (2025-04-24)
417

518
Full Changelog: [v0.23.0...v0.23.1](https://github.com/groq/groq-python/compare/v0.23.0...v0.23.1)

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.23.1"
3+
version = "0.24.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.23.1" # x-release-please-version
4+
__version__ = "0.24.0" # x-release-please-version

src/groq/resources/chat/completions.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ def create(
5555
*,
5656
messages: Iterable[ChatCompletionMessageParam],
5757
model: str,
58+
exclude_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
5859
frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
5960
function_call: Optional[completion_create_params.FunctionCall] | NotGiven = NOT_GIVEN,
6061
functions: Optional[Iterable[completion_create_params.Function]] | NotGiven = NOT_GIVEN,
62+
include_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
6163
logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN,
6264
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
6365
max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN,
@@ -94,9 +96,11 @@ def create(
9496
*,
9597
messages: Iterable[ChatCompletionMessageParam],
9698
model: str,
99+
exclude_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
97100
frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
98101
function_call: Optional[completion_create_params.FunctionCall] | NotGiven = NOT_GIVEN,
99102
functions: Optional[Iterable[completion_create_params.Function]] | NotGiven = NOT_GIVEN,
103+
include_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
100104
logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN,
101105
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
102106
max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN,
@@ -133,9 +137,11 @@ def create(
133137
*,
134138
messages: Iterable[ChatCompletionMessageParam],
135139
model: str,
140+
exclude_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
136141
frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
137142
function_call: Optional[completion_create_params.FunctionCall] | NotGiven = NOT_GIVEN,
138143
functions: Optional[Iterable[completion_create_params.Function]] | NotGiven = NOT_GIVEN,
144+
include_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
139145
logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN,
140146
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
141147
max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN,
@@ -181,9 +187,11 @@ def create(
181187
"llama3-8b-8192",
182188
],
183189
],
190+
exclude_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
184191
frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
185192
function_call: Optional[completion_create_params.FunctionCall] | NotGiven = NOT_GIVEN,
186193
functions: Optional[Iterable[completion_create_params.Function]] | NotGiven = NOT_GIVEN,
194+
include_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
187195
logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN,
188196
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
189197
max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN,
@@ -221,6 +229,9 @@ def create(
221229
model: ID of the model to use. For details on which models are compatible with the Chat
222230
API, see available [models](https://console.groq.com/docs/models)
223231
232+
exclude_domains: A list of domains to exclude from the search results when the model uses a web
233+
search tool.
234+
224235
frequency_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on their
225236
existing frequency in the text so far, decreasing the model's likelihood to
226237
repeat the same line verbatim.
@@ -240,6 +251,9 @@ def create(
240251
241252
A list of functions the model may generate JSON inputs for.
242253
254+
include_domains: A list of domains to include in the search results when the model uses a web
255+
search tool.
256+
243257
logit_bias: This is not yet supported by any of our models. Modify the likelihood of
244258
specified tokens appearing in the completion.
245259
@@ -344,9 +358,11 @@ def create(
344358
{
345359
"messages": messages,
346360
"model": model,
361+
"exclude_domains": exclude_domains,
347362
"frequency_penalty": frequency_penalty,
348363
"function_call": function_call,
349364
"functions": functions,
365+
"include_domains": include_domains,
350366
"logit_bias": logit_bias,
351367
"logprobs": logprobs,
352368
"max_completion_tokens": max_completion_tokens,
@@ -406,9 +422,11 @@ async def create(
406422
*,
407423
messages: Iterable[ChatCompletionMessageParam],
408424
model: str,
425+
exclude_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
409426
frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
410427
function_call: Optional[completion_create_params.FunctionCall] | NotGiven = NOT_GIVEN,
411428
functions: Optional[Iterable[completion_create_params.Function]] | NotGiven = NOT_GIVEN,
429+
include_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
412430
logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN,
413431
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
414432
max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN,
@@ -445,9 +463,11 @@ async def create(
445463
*,
446464
messages: Iterable[ChatCompletionMessageParam],
447465
model: str,
466+
exclude_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
448467
frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
449468
function_call: Optional[completion_create_params.FunctionCall] | NotGiven = NOT_GIVEN,
450469
functions: Optional[Iterable[completion_create_params.Function]] | NotGiven = NOT_GIVEN,
470+
include_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
451471
logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN,
452472
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
453473
max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN,
@@ -484,9 +504,11 @@ async def create(
484504
*,
485505
messages: Iterable[ChatCompletionMessageParam],
486506
model: str,
507+
exclude_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
487508
frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
488509
function_call: Optional[completion_create_params.FunctionCall] | NotGiven = NOT_GIVEN,
489510
functions: Optional[Iterable[completion_create_params.Function]] | NotGiven = NOT_GIVEN,
511+
include_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
490512
logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN,
491513
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
492514
max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN,
@@ -532,9 +554,11 @@ async def create(
532554
"llama3-8b-8192",
533555
],
534556
],
557+
exclude_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
535558
frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
536559
function_call: Optional[completion_create_params.FunctionCall] | NotGiven = NOT_GIVEN,
537560
functions: Optional[Iterable[completion_create_params.Function]] | NotGiven = NOT_GIVEN,
561+
include_domains: Optional[List[str]] | NotGiven = NOT_GIVEN,
538562
logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN,
539563
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
540564
max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN,
@@ -572,6 +596,9 @@ async def create(
572596
model: ID of the model to use. For details on which models are compatible with the Chat
573597
API, see available [models](https://console.groq.com/docs/models)
574598
599+
exclude_domains: A list of domains to exclude from the search results when the model uses a web
600+
search tool.
601+
575602
frequency_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on their
576603
existing frequency in the text so far, decreasing the model's likelihood to
577604
repeat the same line verbatim.
@@ -591,6 +618,9 @@ async def create(
591618
592619
A list of functions the model may generate JSON inputs for.
593620
621+
include_domains: A list of domains to include in the search results when the model uses a web
622+
search tool.
623+
594624
logit_bias: This is not yet supported by any of our models. Modify the likelihood of
595625
specified tokens appearing in the completion.
596626
@@ -695,9 +725,11 @@ async def create(
695725
{
696726
"messages": messages,
697727
"model": model,
728+
"exclude_domains": exclude_domains,
698729
"frequency_penalty": frequency_penalty,
699730
"function_call": function_call,
700731
"functions": functions,
732+
"include_domains": include_domains,
701733
"logit_bias": logit_bias,
702734
"logprobs": logprobs,
703735
"max_completion_tokens": max_completion_tokens,

src/groq/types/chat/completion_create_params.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ class CompletionCreateParams(TypedDict, total=False):
3737
[models](https://console.groq.com/docs/models)
3838
"""
3939

40+
exclude_domains: Optional[List[str]]
41+
"""
42+
A list of domains to exclude from the search results when the model uses a web
43+
search tool.
44+
"""
45+
4046
frequency_penalty: Optional[float]
4147
"""Number between -2.0 and 2.0.
4248
@@ -63,6 +69,12 @@ class CompletionCreateParams(TypedDict, total=False):
6369
A list of functions the model may generate JSON inputs for.
6470
"""
6571

72+
include_domains: Optional[List[str]]
73+
"""
74+
A list of domains to include in the search results when the model uses a web
75+
search tool.
76+
"""
77+
6678
logit_bias: Optional[Dict[str, int]]
6779
"""
6880
This is not yet supported by any of our models. Modify the likelihood of

tests/api_resources/chat/test_completions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def test_method_create_with_all_params(self, client: Groq) -> None:
4141
}
4242
],
4343
model="string",
44+
exclude_domains=["string"],
4445
frequency_penalty=-2,
4546
function_call="none",
4647
functions=[
@@ -50,6 +51,7 @@ def test_method_create_with_all_params(self, client: Groq) -> None:
5051
"parameters": {"foo": "bar"},
5152
}
5253
],
54+
include_domains=["string"],
5355
logit_bias={"foo": 0},
5456
logprobs=True,
5557
max_completion_tokens=0,
@@ -147,6 +149,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGroq) -> N
147149
}
148150
],
149151
model="string",
152+
exclude_domains=["string"],
150153
frequency_penalty=-2,
151154
function_call="none",
152155
functions=[
@@ -156,6 +159,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGroq) -> N
156159
"parameters": {"foo": "bar"},
157160
}
158161
],
162+
include_domains=["string"],
159163
logit_bias={"foo": 0},
160164
logprobs=True,
161165
max_completion_tokens=0,

0 commit comments

Comments
 (0)