diff --git a/.stats.yml b/.stats.yml index 651c6c04..0dbcbc11 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/src/structify/resources/structure/run.py b/src/structify/resources/structure/run.py index 1ff3c950..1adfde3e 100644 --- a/src/structify/resources/structure/run.py +++ b/src/structify/resources/structure/run.py @@ -3,6 +3,7 @@ from __future__ import annotations from typing import Optional, overload +from typing_extensions import Literal import httpx @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/src/structify/resources/structure/run_async.py b/src/structify/resources/structure/run_async.py index 1984aad4..84cb7676 100644 --- a/src/structify/resources/structure/run_async.py +++ b/src/structify/resources/structure/run_async.py @@ -3,6 +3,7 @@ from __future__ import annotations from typing import Optional, overload +from typing_extensions import Literal import httpx @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/src/structify/types/structure/run_async_create_params.py b/src/structify/types/structure/run_async_create_params.py index c56a5dad..c7bdcbb4 100644 --- a/src/structify/types/structure/run_async_create_params.py +++ b/src/structify/types/structure/run_async_create_params.py @@ -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 @@ -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): @@ -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): @@ -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): @@ -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): diff --git a/src/structify/types/structure/run_create_params.py b/src/structify/types/structure/run_create_params.py index 62f559d1..aca5c0c1 100644 --- a/src/structify/types/structure/run_create_params.py +++ b/src/structify/types/structure/run_create_params.py @@ -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 @@ -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): @@ -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): @@ -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): @@ -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): diff --git a/tests/api_resources/structure/test_run.py b/tests/api_resources/structure/test_run.py index d9eaa000..3a265375 100644 --- a/tests/api_resources/structure/test_run.py +++ b/tests/api_resources/structure/test_run.py @@ -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"]) @@ -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"]) @@ -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"]) @@ -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"]) @@ -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"]) @@ -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"]) @@ -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"]) @@ -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"]) diff --git a/tests/api_resources/structure/test_run_async.py b/tests/api_resources/structure/test_run_async.py index 9ecc154c..446926c8 100644 --- a/tests/api_resources/structure/test_run_async.py +++ b/tests/api_resources/structure/test_run_async.py @@ -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_async, path=["response"]) @@ -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_async, path=["response"]) @@ -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_async, path=["response"]) @@ -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_async, path=["response"]) @@ -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_async, path=["response"]) @@ -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_async, path=["response"]) @@ -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_async, path=["response"]) @@ -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_async, path=["response"])