Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed May 16, 2024
1 parent c8eaad3 commit 18bce01
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 13 deletions.
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-a3e82ffbc462174007a5f736784cde91069ac2fd1468c89b0b9faea2fa82580a.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-4643bbeed7059f8301560a9fa93e4196393cf65a0ce9b243f5bc071efadd2748.yml
8 changes: 1 addition & 7 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ Methods:

# Audio

Types:

```python
from groq.types import Translation
```

## Transcriptions

Types:
Expand All @@ -49,7 +43,7 @@ Methods:
Types:

```python
from groq.types.audio import TranslationCreateResponse
from groq.types.audio import Translation, TranslationCreateResponse
```

Methods:
Expand Down
1 change: 0 additions & 1 deletion src/groq/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
from .model import Model as Model
from .embedding import Embedding as Embedding
from .model_list import ModelList as ModelList
from .translation import Translation as Translation
from .embedding_create_params import EmbeddingCreateParams as EmbeddingCreateParams
from .create_embedding_response import CreateEmbeddingResponse as CreateEmbeddingResponse
1 change: 1 addition & 0 deletions src/groq/types/audio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from .translation import Translation as Translation
from .transcription import Transcription as Transcription
from .translation_create_params import TranslationCreateParams as TranslationCreateParams
from .transcription_create_params import TranscriptionCreateParams as TranscriptionCreateParams
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@



from .._models import BaseModel
from ..._models import BaseModel

__all__ = ["Translation"]

Expand Down
2 changes: 1 addition & 1 deletion src/groq/types/audio/translation_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import List, Union, Optional

from ..._models import BaseModel
from ..translation import Translation
from .translation import Translation

__all__ = [
"TranslationCreateResponse",
Expand Down
37 changes: 35 additions & 2 deletions src/groq/types/chat/completion_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
from __future__ import annotations

from typing import Dict, List, Union, Iterable, Optional
from typing_extensions import Required, Annotated, TypedDict
from typing_extensions import Literal, Required, Annotated, TypedDict

from ..._utils import PropertyInfo

__all__ = [
"CompletionCreateParams",
"Message",
"MessageContentUnionMember1",
"MessageContentUnionMember1TypesChatCompletionRequestMessageContentPartText",
"MessageContentUnionMember1TypesChatCompletionRequestMessageContentPartImage",
"MessageContentUnionMember1TypesChatCompletionRequestMessageContentPartImageImageURL",
"MessageToolCall",
"MessageToolCallFunction",
"ResponseFormat",
Expand Down Expand Up @@ -63,6 +67,35 @@ class CompletionCreateParams(TypedDict, total=False):
user: str


class MessageContentUnionMember1TypesChatCompletionRequestMessageContentPartText(TypedDict, total=False):
text: Required[str]
"""The text content."""

type: Required[Literal["text"]]
"""The type of the content part."""


class MessageContentUnionMember1TypesChatCompletionRequestMessageContentPartImageImageURL(TypedDict, total=False):
url: Required[str]
"""Either a URL of the image or the base64 encoded image data."""

detail: Literal["auto", "low", "high"]
"""Specifies the detail level of the image."""


class MessageContentUnionMember1TypesChatCompletionRequestMessageContentPartImage(TypedDict, total=False):
image_url: Required[MessageContentUnionMember1TypesChatCompletionRequestMessageContentPartImageImageURL]

type: Required[Literal["image_url"]]
"""The type of the content part."""


MessageContentUnionMember1 = Union[
MessageContentUnionMember1TypesChatCompletionRequestMessageContentPartText,
MessageContentUnionMember1TypesChatCompletionRequestMessageContentPartImage,
]


class MessageToolCallFunction(TypedDict, total=False):
arguments: str

Expand All @@ -78,7 +111,7 @@ class MessageToolCall(TypedDict, total=False):


class Message(TypedDict, total=False):
content: Required[str]
content: Required[Union[str, Iterable[MessageContentUnionMember1]]]

role: Required[str]

Expand Down

0 comments on commit 18bce01

Please sign in to comment.