Skip to content
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 .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-82797b9f004b8c807380a1fa8eec4dc51d760b0f7f1705409a171e88e370102f.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-b33d3547dd14387df0951ff9638519f7c1a125db265801f63e9136cfa5e4578b.yml
4 changes: 4 additions & 0 deletions src/groq/resources/chat/completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def create(
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
response_format: Optional[completion_create_params.ResponseFormat] | NotGiven = NOT_GIVEN,
seed: Optional[int] | NotGiven = NOT_GIVEN,
service_tier: Optional[Literal["on_demand", "flex"]] | NotGiven = NOT_GIVEN,
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
stream: Optional[bool] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -208,6 +209,7 @@ def create(
"presence_penalty": presence_penalty,
"response_format": response_format,
"seed": seed,
"service_tier": service_tier,
"stop": stop,
"stream": stream,
"temperature": temperature,
Expand Down Expand Up @@ -262,6 +264,7 @@ async def create(
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
response_format: Optional[completion_create_params.ResponseFormat] | NotGiven = NOT_GIVEN,
seed: Optional[int] | NotGiven = NOT_GIVEN,
service_tier: Optional[Literal["on_demand", "flex"]] | NotGiven = NOT_GIVEN,
stop: Union[Optional[str], List[str], None] | NotGiven = NOT_GIVEN,
stream: Optional[bool] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -404,6 +407,7 @@ async def create(
"presence_penalty": presence_penalty,
"response_format": response_format,
"seed": seed,
"service_tier": service_tier,
"stop": stop,
"stream": stream,
"temperature": temperature,
Expand Down
2 changes: 2 additions & 0 deletions src/groq/types/chat/completion_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ class CompletionCreateParams(TypedDict, total=False):
`system_fingerprint` response parameter to monitor changes in the backend.
"""

service_tier: Optional[Literal["on_demand", "flex"]]

stop: Union[Optional[str], List[str], None]
"""Up to 4 sequences where the API will stop generating further tokens.

Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/chat/test_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def test_method_create_with_all_params(self, client: Groq) -> None:
presence_penalty=-2,
response_format={"type": "text"},
seed=0,
service_tier="on_demand",
stop="\n",
stream=True,
temperature=1,
Expand Down Expand Up @@ -159,6 +160,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGroq) -> N
presence_penalty=-2,
response_format={"type": "text"},
seed=0,
service_tier="on_demand",
stop="\n",
stream=True,
temperature=1,
Expand Down