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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.0.11"
".": "0.1.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-98d52eb3c876e59ab21e8f1301f4e6eeb046c308eb6ffd2dc47b65d0d7b9873a.yml
configured_endpoints: 10
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-990d8e4966391be90cdcbac42a5b5e5cadeab4122fb2a6e121cc89ec8135e079.yml
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.1.0 (2024-10-22)

Full Changelog: [v0.0.11...v0.1.0](https://github.com/ArcadeAI/arcade-py/compare/v0.0.11...v0.1.0)

### Features

* **api:** api update ([#25](https://github.com/ArcadeAI/arcade-py/issues/25)) ([c3ac0fa](https://github.com/ArcadeAI/arcade-py/commit/c3ac0fad62cf13e01f483448132d196f45f218af))
* **api:** api update ([#27](https://github.com/ArcadeAI/arcade-py/issues/27)) ([f62efbf](https://github.com/ArcadeAI/arcade-py/commit/f62efbf57628d3d9b6e2734aec1c8028e21e54b4))
* **api:** api update ([#28](https://github.com/ArcadeAI/arcade-py/issues/28)) ([5614650](https://github.com/ArcadeAI/arcade-py/commit/561465067e08077515f5e5cb361d8d09b0f7ead9))

## 0.0.11 (2024-10-15)

Full Changelog: [v0.1.0-alpha.4...v0.0.11](https://github.com/ArcadeAI/arcade-py/compare/v0.1.0-alpha.4...v0.0.11)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/).

## Documentation

The REST API documentation can be found on [arcade-ai.com](https://arcade-ai.com). The full API of this library can be found in [api.md](api.md).
The REST API documentation can be found on [docs.arcade-ai.com](https://docs.arcade-ai.com). The full API of this library can be found in [api.md](api.md).

## Installation

Expand Down
15 changes: 11 additions & 4 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,25 @@ from arcadepy.types import (
ResponseOutput,
ToolkitDefinition,
ValueSchema,
ToolListResponse,
)
```

Methods:

- <code title="get /v1/tools/list">client.tools.<a href="./src/arcadepy/resources/tools/tools.py">list</a>(\*\*<a href="src/arcadepy/types/tool_list_params.py">params</a>) -> <a href="./src/arcadepy/types/tool_list_response.py">ToolListResponse</a></code>
- <code title="get /v1/tools/list">client.tools.<a href="./src/arcadepy/resources/tools/tools.py">list</a>(\*\*<a href="src/arcadepy/types/tool_list_params.py">params</a>) -> <a href="./src/arcadepy/types/shared/tool_definition.py">SyncOffsetPage[ToolDefinition]</a></code>
- <code title="post /v1/tools/authorize">client.tools.<a href="./src/arcadepy/resources/tools/tools.py">authorize</a>(\*\*<a href="src/arcadepy/types/tool_authorize_params.py">params</a>) -> <a href="./src/arcadepy/types/shared/authorization_response.py">AuthorizationResponse</a></code>
- <code title="post /v1/tools/execute">client.tools.<a href="./src/arcadepy/resources/tools/tools.py">execute</a>(\*\*<a href="src/arcadepy/types/tool_execute_params.py">params</a>) -> <a href="./src/arcadepy/types/response.py">Response</a></code>
- <code title="get /v1/tools/definition">client.tools.<a href="./src/arcadepy/resources/tools/tools.py">get</a>(\*\*<a href="src/arcadepy/types/tool_get_params.py">params</a>) -> <a href="./src/arcadepy/types/shared/tool_definition.py">ToolDefinition</a></code>

## Definition
## Formatted

Types:

```python
from arcadepy.types.tools import FormattedListResponse, FormattedGetResponse
```

Methods:

- <code title="get /v1/tools/definition">client.tools.definition.<a href="./src/arcadepy/resources/tools/definition.py">get</a>(\*\*<a href="src/arcadepy/types/tools/definition_get_params.py">params</a>) -> <a href="./src/arcadepy/types/shared/tool_definition.py">ToolDefinition</a></code>
- <code title="get /v1/tools/formatted/list">client.tools.formatted.<a href="./src/arcadepy/resources/tools/formatted.py">list</a>(\*\*<a href="src/arcadepy/types/tools/formatted_list_params.py">params</a>) -> <a href="./src/arcadepy/types/tools/formatted_list_response.py">SyncOffsetPage[object]</a></code>
- <code title="get /v1/tools/formatted/definition">client.tools.formatted.<a href="./src/arcadepy/resources/tools/formatted.py">get</a>(\*\*<a href="src/arcadepy/types/tools/formatted_get_params.py">params</a>) -> <a href="./src/arcadepy/types/tools/formatted_get_response.py">object</a></code>
10 changes: 3 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "arcadepy"
version = "0.0.11"
version = "0.1.0"
description = "The official Python library for the Arcade API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -63,11 +63,11 @@ format = { chain = [
"format:ruff",
"format:docs",
"fix:ruff",
# run formatting again to fix any inconsistencies when imports are stripped
"format:ruff",
]}
"format:black" = "black ."
"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md"
"format:ruff" = "ruff format"
"format:isort" = "isort ."

"lint" = { chain = [
"check:ruff",
Expand Down Expand Up @@ -125,10 +125,6 @@ path = "README.md"
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
replacement = '[\1](https://github.com/ArcadeAI/arcade-py/tree/main/\g<2>)'

[tool.black]
line-length = 120
target-version = ["py37"]

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--tb=short"
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pytz==2023.3.post1
# via dirty-equals
respx==0.20.2
rich==13.7.1
ruff==0.6.5
ruff==0.6.9
setuptools==68.2.2
# via nodeenv
six==1.16.0
Expand Down
2 changes: 1 addition & 1 deletion src/arcadepy/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ async def _request(
except Exception as err:
log.debug("Encountered Exception", exc_info=True)

if retries_taken > 0:
if remaining_retries > 0:
return await self._retry_request(
input_options,
cast_to,
Expand Down
2 changes: 1 addition & 1 deletion src/arcadepy/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "arcadepy"
__version__ = "0.0.11" # x-release-please-version
__version__ = "0.1.0" # x-release-please-version
72 changes: 72 additions & 0 deletions src/arcadepy/pagination.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Generic, TypeVar, Optional
from typing_extensions import override

from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage

__all__ = ["SyncOffsetPage", "AsyncOffsetPage"]

_T = TypeVar("_T")


class SyncOffsetPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
items: List[_T]
total_count: Optional[int] = None
page_count: Optional[int] = None

@override
def _get_page_items(self) -> List[_T]:
items = self.items
if not items:
return []
return items

@override
def next_page_info(self) -> Optional[PageInfo]:
page_count = self.page_count
if page_count is None:
return None

length = len(self._get_page_items())
current_count = page_count + length

total_count = self.total_count
if total_count is None:
return None

if current_count < total_count:
return PageInfo(params={"offset": current_count})

return None


class AsyncOffsetPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
items: List[_T]
total_count: Optional[int] = None
page_count: Optional[int] = None

@override
def _get_page_items(self) -> List[_T]:
items = self.items
if not items:
return []
return items

@override
def next_page_info(self) -> Optional[PageInfo]:
page_count = self.page_count
if page_count is None:
return None

length = len(self._get_page_items())
current_count = page_count + length

total_count = self.total_count
if total_count is None:
return None

if current_count < total_count:
return PageInfo(params={"offset": current_count})

return None
4 changes: 2 additions & 2 deletions src/arcadepy/resources/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def status(

scopes: Scopes

wait: Timeout in seconds (max 60)
wait: Timeout in seconds (max 59)

extra_headers: Send extra headers

Expand Down Expand Up @@ -234,7 +234,7 @@ async def status(

scopes: Scopes

wait: Timeout in seconds (max 60)
wait: Timeout in seconds (max 59)

extra_headers: Send extra headers

Expand Down
8 changes: 4 additions & 4 deletions src/arcadepy/resources/chat/completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def create(
stream: bool | NotGiven = NOT_GIVEN,
stream_options: completion_create_params.StreamOptions | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
tool_choice: Dict[str, object] | NotGiven = NOT_GIVEN,
tools: Dict[str, object] | NotGiven = NOT_GIVEN,
tool_choice: object | NotGiven = NOT_GIVEN,
tools: object | NotGiven = NOT_GIVEN,
top_logprobs: int | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
user: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -189,8 +189,8 @@ async def create(
stream: bool | NotGiven = NOT_GIVEN,
stream_options: completion_create_params.StreamOptions | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
tool_choice: Dict[str, object] | NotGiven = NOT_GIVEN,
tools: Dict[str, object] | NotGiven = NOT_GIVEN,
tool_choice: object | NotGiven = NOT_GIVEN,
tools: object | NotGiven = NOT_GIVEN,
top_logprobs: int | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
user: str | NotGiven = NOT_GIVEN,
Expand Down
Loading