Skip to content

Commit

Permalink
feat(api): api update (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Jan 7, 2025
1 parent 9cb1e72 commit 5016206
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
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 @@ -170,6 +170,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[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -312,6 +313,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 @@ -470,6 +472,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[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -612,6 +615,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=False,
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=False,
temperature=1,
Expand Down

0 comments on commit 5016206

Please sign in to comment.