Skip to content

Commit

Permalink
Release 0.0.1-beta14
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Sep 11, 2024
1 parent 754a6fb commit dd00b04
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 508 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "gooeyai"
version = "0.0.1-beta13"
version = "0.0.1-beta14"
description = ""
readme = "README.md"
authors = []
Expand Down
163 changes: 2 additions & 161 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -5637,7 +5637,7 @@ Generally speaking, dense embeddings excel at understanding the context of the q
</dl>
</details>

<details><summary><code>client.<a href="src/gooey/client.py">health_status_get</a>()</code></summary>
<details><summary><code>client.<a href="src/gooey/client.py">get_balance</a>()</code></summary>
<dl>
<dd>

Expand All @@ -5655,7 +5655,7 @@ from gooey import Gooey
client = Gooey(
api_key="YOUR_API_KEY",
)
client.health_status_get()
client.get_balance()

```
</dd>
Expand Down Expand Up @@ -6243,162 +6243,3 @@ typing.Optional[core.File]` — See core.File for more documentation
</dl>
</details>

## Misc
<details><summary><code>client.misc.<a href="src/gooey/misc/client.py">get_balance</a>()</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
from gooey import Gooey

client = Gooey(
api_key="YOUR_API_KEY",
)
client.misc.get_balance()

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.misc.<a href="src/gooey/misc/client.py">video_bots_broadcast</a>(...)</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
from gooey import Gooey

client = Gooey(
api_key="YOUR_API_KEY",
)
client.misc.video_bots_broadcast(
text="text",
)

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**text:** `str` — Message to broadcast to all users

</dd>
</dl>

<dl>
<dd>

**example_id:** `typing.Optional[str]`

</dd>
</dl>

<dl>
<dd>

**run_id:** `typing.Optional[str]`

</dd>
</dl>

<dl>
<dd>

**audio:** `typing.Optional[str]` — Audio URL to send to all users

</dd>
</dl>

<dl>
<dd>

**video:** `typing.Optional[str]` — Video URL to send to all users

</dd>
</dl>

<dl>
<dd>

**documents:** `typing.Optional[typing.Sequence[str]]` — Video URL to send to all users

</dd>
</dl>

<dl>
<dd>

**buttons:** `typing.Optional[typing.Sequence[ReplyButton]]` — Buttons to send to all users

</dd>
</dl>

<dl>
<dd>

**filters:** `typing.Optional[BotBroadcastFilters]` — Filters to select users to broadcast to. If not provided, will broadcast to all users of this bot.

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

5 changes: 3 additions & 2 deletions src/gooey/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
AsyncApiResponseModelV3,
BalanceResponse,
BotBroadcastFilters,
BotBroadcastRequestModel,
BulkEvalPageOutput,
BulkEvalPageRequestAggFunctionsItem,
BulkEvalPageRequestAggFunctionsItemFunction,
Expand Down Expand Up @@ -365,7 +366,7 @@
VideoBotsPageStatusResponse,
)
from .errors import PaymentRequiredError, TooManyRequestsError, UnprocessableEntityError
from . import copilot, misc
from . import copilot
from .client import AsyncGooey, Gooey
from .copilot import (
CopilotCompletionRequestAsrModel,
Expand Down Expand Up @@ -413,6 +414,7 @@
"AsyncGooey",
"BalanceResponse",
"BotBroadcastFilters",
"BotBroadcastRequestModel",
"BulkEvalPageOutput",
"BulkEvalPageRequestAggFunctionsItem",
"BulkEvalPageRequestAggFunctionsItemFunction",
Expand Down Expand Up @@ -783,5 +785,4 @@
"VideoBotsPageStatusResponse",
"__version__",
"copilot",
"misc",
]
33 changes: 13 additions & 20 deletions src/gooey/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from .core.api_error import ApiError
from .core.client_wrapper import SyncClientWrapper
from .copilot.client import CopilotClient
from .misc.client import MiscClient
from .types.deforum_sd_page_request_animation_prompts_item import DeforumSdPageRequestAnimationPromptsItem
from .types.deforum_sd_page_request_functions_item import DeforumSdPageRequestFunctionsItem
from .types.deforum_sd_page_request_selected_model import DeforumSdPageRequestSelectedModel
Expand Down Expand Up @@ -144,9 +143,9 @@
from .types.related_qn_a_doc_page_request_citation_style import RelatedQnADocPageRequestCitationStyle
from .types.related_qn_a_doc_page_request_response_format_type import RelatedQnADocPageRequestResponseFormatType
from .types.related_qn_a_doc_page_output import RelatedQnADocPageOutput
from .types.balance_response import BalanceResponse
from .core.client_wrapper import AsyncClientWrapper
from .copilot.client import AsyncCopilotClient
from .misc.client import AsyncMiscClient

# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
Expand Down Expand Up @@ -213,7 +212,6 @@ def __init__(
timeout=_defaulted_timeout,
)
self.copilot = CopilotClient(client_wrapper=self._client_wrapper)
self.misc = MiscClient(client_wrapper=self._client_wrapper)

def animate(
self,
Expand Down Expand Up @@ -4828,9 +4826,7 @@ def seo_people_also_ask_doc(
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)

def health_status_get(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> typing.Optional[typing.Any]:
def get_balance(self, *, request_options: typing.Optional[RequestOptions] = None) -> BalanceResponse:
"""
Parameters
----------
Expand All @@ -4839,7 +4835,7 @@ def health_status_get(
Returns
-------
typing.Optional[typing.Any]
BalanceResponse
Successful Response
Examples
Expand All @@ -4849,19 +4845,19 @@ def health_status_get(
client = Gooey(
api_key="YOUR_API_KEY",
)
client.health_status_get()
client.get_balance()
"""
_response = self._client_wrapper.httpx_client.request(
"status",
"v1/balance/",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
return typing.cast(
typing.Optional[typing.Any],
BalanceResponse,
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
type_=BalanceResponse, # type: ignore
object_=_response.json(),
),
)
Expand Down Expand Up @@ -4932,7 +4928,6 @@ def __init__(
timeout=_defaulted_timeout,
)
self.copilot = AsyncCopilotClient(client_wrapper=self._client_wrapper)
self.misc = AsyncMiscClient(client_wrapper=self._client_wrapper)

async def animate(
self,
Expand Down Expand Up @@ -9787,9 +9782,7 @@ async def main() -> None:
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)

async def health_status_get(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> typing.Optional[typing.Any]:
async def get_balance(self, *, request_options: typing.Optional[RequestOptions] = None) -> BalanceResponse:
"""
Parameters
----------
Expand All @@ -9798,7 +9791,7 @@ async def health_status_get(
Returns
-------
typing.Optional[typing.Any]
BalanceResponse
Successful Response
Examples
Expand All @@ -9813,22 +9806,22 @@ async def health_status_get(
async def main() -> None:
await client.health_status_get()
await client.get_balance()
asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"status",
"v1/balance/",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
return typing.cast(
typing.Optional[typing.Any],
BalanceResponse,
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
type_=BalanceResponse, # type: ignore
object_=_response.json(),
),
)
Expand Down
2 changes: 1 addition & 1 deletion src/gooey/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "gooeyai",
"X-Fern-SDK-Version": "0.0.1-beta13",
"X-Fern-SDK-Version": "0.0.1-beta14",
}
headers["Authorization"] = f"Bearer {self._get_api_key()}"
return headers
Expand Down
2 changes: 0 additions & 2 deletions src/gooey/misc/__init__.py

This file was deleted.

Loading

0 comments on commit dd00b04

Please sign in to comment.