Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored May 14, 2024
1 parent a31ca18 commit aca596f
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 47 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: 20
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-aa1bdd07a9fcf09044a5dae55e26b5bf3fcd742b8f3a86e1e815f67c45cf5030.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-2988f1610b40c428d0b457b5b596f5ca80d371daf3e99ef0317dad31d8f2dfa3.yml
21 changes: 11 additions & 10 deletions src/structify/resources/structure/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

from typing import Optional, overload
from typing_extensions import Literal

import httpx

Expand Down Expand Up @@ -44,7 +45,7 @@ def create(
dataset_name: str,
text: run_create_params.Variant0Text,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -77,7 +78,7 @@ def create(
dataset_name: str,
document: run_create_params.Variant1Document,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -110,7 +111,7 @@ def create(
dataset_name: str,
web: run_create_params.Variant2Web,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -143,7 +144,7 @@ def create(
dataset_name: str,
sec_filing: run_create_params.Variant3SecFiling,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -178,7 +179,7 @@ def create(
dataset_name: str,
text: run_create_params.Variant0Text | NotGiven = NOT_GIVEN,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
document: run_create_params.Variant1Document | NotGiven = NOT_GIVEN,
web: run_create_params.Variant2Web | NotGiven = NOT_GIVEN,
sec_filing: run_create_params.Variant3SecFiling | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -234,7 +235,7 @@ async def create(
dataset_name: str,
text: run_create_params.Variant0Text,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -267,7 +268,7 @@ async def create(
dataset_name: str,
document: run_create_params.Variant1Document,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -300,7 +301,7 @@ async def create(
dataset_name: str,
web: run_create_params.Variant2Web,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -333,7 +334,7 @@ async def create(
dataset_name: str,
sec_filing: run_create_params.Variant3SecFiling,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -368,7 +369,7 @@ async def create(
dataset_name: str,
text: run_create_params.Variant0Text | NotGiven = NOT_GIVEN,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
document: run_create_params.Variant1Document | NotGiven = NOT_GIVEN,
web: run_create_params.Variant2Web | NotGiven = NOT_GIVEN,
sec_filing: run_create_params.Variant3SecFiling | NotGiven = NOT_GIVEN,
Expand Down
21 changes: 11 additions & 10 deletions src/structify/resources/structure/run_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

from typing import Optional, overload
from typing_extensions import Literal

import httpx

Expand Down Expand Up @@ -44,7 +45,7 @@ def create(
dataset_name: str,
text: run_async_create_params.Variant0Text,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -76,7 +77,7 @@ def create(
dataset_name: str,
document: run_async_create_params.Variant1Document,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -108,7 +109,7 @@ def create(
dataset_name: str,
web: run_async_create_params.Variant2Web,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -140,7 +141,7 @@ def create(
dataset_name: str,
sec_filing: run_async_create_params.Variant3SecFiling,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -174,7 +175,7 @@ def create(
dataset_name: str,
text: run_async_create_params.Variant0Text | NotGiven = NOT_GIVEN,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
document: run_async_create_params.Variant1Document | NotGiven = NOT_GIVEN,
web: run_async_create_params.Variant2Web | NotGiven = NOT_GIVEN,
sec_filing: run_async_create_params.Variant3SecFiling | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -230,7 +231,7 @@ async def create(
dataset_name: str,
text: run_async_create_params.Variant0Text,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -262,7 +263,7 @@ async def create(
dataset_name: str,
document: run_async_create_params.Variant1Document,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -294,7 +295,7 @@ async def create(
dataset_name: str,
web: run_async_create_params.Variant2Web,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -326,7 +327,7 @@ async def create(
dataset_name: str,
sec_filing: run_async_create_params.Variant3SecFiling,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -360,7 +361,7 @@ async def create(
dataset_name: str,
text: run_async_create_params.Variant0Text | NotGiven = NOT_GIVEN,
custom_instruction: Optional[str] | NotGiven = NOT_GIVEN,
llm: Optional[object] | NotGiven = NOT_GIVEN,
llm: Optional[Literal["Gpt4V", "Structify", "Human"]] | NotGiven = NOT_GIVEN,
document: run_async_create_params.Variant1Document | NotGiven = NOT_GIVEN,
web: run_async_create_params.Variant2Web | NotGiven = NOT_GIVEN,
sec_filing: run_async_create_params.Variant3SecFiling | NotGiven = NOT_GIVEN,
Expand Down
10 changes: 5 additions & 5 deletions src/structify/types/structure/run_async_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from typing import Union, Optional
from typing_extensions import Required, Annotated, TypedDict
from typing_extensions import Literal, Required, Annotated, TypedDict

from ..._utils import PropertyInfo

Expand All @@ -27,7 +27,7 @@ class Variant0(TypedDict, total=False):

custom_instruction: Optional[str]

llm: Optional[object]
llm: Optional[Literal["Gpt4V", "Structify", "Human"]]


class Variant0Text(TypedDict, total=False):
Expand All @@ -41,7 +41,7 @@ class Variant1(TypedDict, total=False):

custom_instruction: Optional[str]

llm: Optional[object]
llm: Optional[Literal["Gpt4V", "Structify", "Human"]]


class Variant1Document(TypedDict, total=False):
Expand All @@ -55,7 +55,7 @@ class Variant2(TypedDict, total=False):

custom_instruction: Optional[str]

llm: Optional[object]
llm: Optional[Literal["Gpt4V", "Structify", "Human"]]


class Variant2Web(TypedDict, total=False):
Expand All @@ -71,7 +71,7 @@ class Variant3(TypedDict, total=False):

custom_instruction: Optional[str]

llm: Optional[object]
llm: Optional[Literal["Gpt4V", "Structify", "Human"]]


class Variant3SecFiling(TypedDict, total=False):
Expand Down
10 changes: 5 additions & 5 deletions src/structify/types/structure/run_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from typing import Union, Optional
from typing_extensions import Required, Annotated, TypedDict
from typing_extensions import Literal, Required, Annotated, TypedDict

from ..._utils import PropertyInfo

Expand All @@ -27,7 +27,7 @@ class Variant0(TypedDict, total=False):

custom_instruction: Optional[str]

llm: Optional[object]
llm: Optional[Literal["Gpt4V", "Structify", "Human"]]


class Variant0Text(TypedDict, total=False):
Expand All @@ -41,7 +41,7 @@ class Variant1(TypedDict, total=False):

custom_instruction: Optional[str]

llm: Optional[object]
llm: Optional[Literal["Gpt4V", "Structify", "Human"]]


class Variant1Document(TypedDict, total=False):
Expand All @@ -55,7 +55,7 @@ class Variant2(TypedDict, total=False):

custom_instruction: Optional[str]

llm: Optional[object]
llm: Optional[Literal["Gpt4V", "Structify", "Human"]]


class Variant2Web(TypedDict, total=False):
Expand All @@ -71,7 +71,7 @@ class Variant3(TypedDict, total=False):

custom_instruction: Optional[str]

llm: Optional[object]
llm: Optional[Literal["Gpt4V", "Structify", "Human"]]


class Variant3SecFiling(TypedDict, total=False):
Expand Down
16 changes: 8 additions & 8 deletions tests/api_resources/structure/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_method_create_with_all_params_overload_1(self, client: Structify) -> No
dataset_name="string",
text={"text_content": "string"},
custom_instruction="string",
llm={},
llm="Gpt4V",
)
assert_matches_type(object, run, path=["response"])

Expand Down Expand Up @@ -74,7 +74,7 @@ def test_method_create_with_all_params_overload_2(self, client: Structify) -> No
dataset_name="string",
document={"path": "string"},
custom_instruction="string",
llm={},
llm="Gpt4V",
)
assert_matches_type(object, run, path=["response"])

Expand Down Expand Up @@ -121,7 +121,7 @@ def test_method_create_with_all_params_overload_3(self, client: Structify) -> No
"starting_website": "string",
},
custom_instruction="string",
llm={},
llm="Gpt4V",
)
assert_matches_type(object, run, path=["response"])

Expand Down Expand Up @@ -169,7 +169,7 @@ def test_method_create_with_all_params_overload_4(self, client: Structify) -> No
"year": 0,
},
custom_instruction="string",
llm={},
llm="Gpt4V",
)
assert_matches_type(object, run, path=["response"])

Expand Down Expand Up @@ -217,7 +217,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
dataset_name="string",
text={"text_content": "string"},
custom_instruction="string",
llm={},
llm="Gpt4V",
)
assert_matches_type(object, run, path=["response"])

Expand Down Expand Up @@ -261,7 +261,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
dataset_name="string",
document={"path": "string"},
custom_instruction="string",
llm={},
llm="Gpt4V",
)
assert_matches_type(object, run, path=["response"])

Expand Down Expand Up @@ -308,7 +308,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn
"starting_website": "string",
},
custom_instruction="string",
llm={},
llm="Gpt4V",
)
assert_matches_type(object, run, path=["response"])

Expand Down Expand Up @@ -356,7 +356,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn
"year": 0,
},
custom_instruction="string",
llm={},
llm="Gpt4V",
)
assert_matches_type(object, run, path=["response"])

Expand Down
Loading

0 comments on commit aca596f

Please sign in to comment.