From 6cb2a5d2b2085fabe75f361014dd5caff37045e1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 16:58:02 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#4) --- .stats.yml | 2 +- api.md | 4 +- src/structify/resources/structure/run.py | 37 ++++++++++------- .../resources/structure/run_async.py | 37 ++++++++++------- src/structify/types/structure/__init__.py | 1 + src/structify/types/structure/llm.py | 7 ++++ .../structure/run_async_create_params.py | 17 ++++---- .../types/structure/run_create_params.py | 17 ++++---- tests/api_resources/structure/test_run.py | 40 +++++++++++++++---- .../api_resources/structure/test_run_async.py | 40 +++++++++++++++---- 10 files changed, 137 insertions(+), 65 deletions(-) create mode 100644 src/structify/types/structure/llm.py diff --git a/.stats.yml b/.stats.yml index 651c6c04..f264ff63 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-48f219e1b0e6ca3514d5922413233d8da39b0a01e299e434253db4e07e8e8fb3.yml diff --git a/api.md b/api.md index 8f7bd9d7..8bee1453 100644 --- a/api.md +++ b/api.md @@ -131,7 +131,7 @@ Methods: Types: ```python -from structify.types.structure import RunCreateResponse +from structify.types.structure import Llm, RunCreateResponse ``` Methods: @@ -143,7 +143,7 @@ Methods: Types: ```python -from structify.types.structure import RunAsyncCreateResponse +from structify.types.structure import Llm, RunAsyncCreateResponse ``` Methods: diff --git a/src/structify/resources/structure/run.py b/src/structify/resources/structure/run.py index 1ff3c950..f7987842 100644 --- a/src/structify/resources/structure/run.py +++ b/src/structify/resources/structure/run.py @@ -23,7 +23,8 @@ from ..._base_client import ( make_request_options, ) -from ...types.structure import run_create_params +from ...types.structure import Llm, run_create_params +from ...types.structure.llm import Llm __all__ = ["RunResource", "AsyncRunResource"] @@ -42,9 +43,9 @@ def create( self, *, dataset_name: str, + llm: Llm, text: run_create_params.Variant0Text, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -75,9 +76,9 @@ def create( self, *, dataset_name: str, + llm: Llm, document: run_create_params.Variant1Document, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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,9 +109,9 @@ def create( self, *, dataset_name: str, + llm: Llm, web: run_create_params.Variant2Web, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -141,9 +142,9 @@ def create( self, *, dataset_name: str, + llm: Llm, sec_filing: run_create_params.Variant3SecFiling, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -170,15 +171,18 @@ def create( ... @required_args( - ["dataset_name", "text"], ["dataset_name", "document"], ["dataset_name", "web"], ["dataset_name", "sec_filing"] + ["dataset_name", "llm", "text"], + ["dataset_name", "llm", "document"], + ["dataset_name", "llm", "web"], + ["dataset_name", "llm", "sec_filing"], ) def create( self, *, dataset_name: str, + llm: Llm, text: run_create_params.Variant0Text | NotGiven = NOT_GIVEN, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -208,8 +212,8 @@ def create( query=maybe_transform( { "dataset_name": dataset_name, - "custom_instruction": custom_instruction, "llm": llm, + "custom_instruction": custom_instruction, }, run_create_params.RunCreateParams, ), @@ -232,9 +236,9 @@ async def create( self, *, dataset_name: str, + llm: Llm, text: run_create_params.Variant0Text, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -265,9 +269,9 @@ async def create( self, *, dataset_name: str, + llm: Llm, document: run_create_params.Variant1Document, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -298,9 +302,9 @@ async def create( self, *, dataset_name: str, + llm: Llm, web: run_create_params.Variant2Web, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -331,9 +335,9 @@ async def create( self, *, dataset_name: str, + llm: Llm, sec_filing: run_create_params.Variant3SecFiling, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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,15 +364,18 @@ async def create( ... @required_args( - ["dataset_name", "text"], ["dataset_name", "document"], ["dataset_name", "web"], ["dataset_name", "sec_filing"] + ["dataset_name", "llm", "text"], + ["dataset_name", "llm", "document"], + ["dataset_name", "llm", "web"], + ["dataset_name", "llm", "sec_filing"], ) async def create( self, *, dataset_name: str, + llm: Llm, text: run_create_params.Variant0Text | NotGiven = NOT_GIVEN, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -398,8 +405,8 @@ async def create( query=await async_maybe_transform( { "dataset_name": dataset_name, - "custom_instruction": custom_instruction, "llm": llm, + "custom_instruction": custom_instruction, }, run_create_params.RunCreateParams, ), diff --git a/src/structify/resources/structure/run_async.py b/src/structify/resources/structure/run_async.py index 1984aad4..cc340618 100644 --- a/src/structify/resources/structure/run_async.py +++ b/src/structify/resources/structure/run_async.py @@ -23,7 +23,8 @@ from ..._base_client import ( make_request_options, ) -from ...types.structure import run_async_create_params +from ...types.structure import Llm, run_async_create_params +from ...types.structure.llm import Llm __all__ = ["RunAsyncResource", "AsyncRunAsyncResource"] @@ -42,9 +43,9 @@ def create( self, *, dataset_name: str, + llm: Llm, text: run_async_create_params.Variant0Text, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -74,9 +75,9 @@ def create( self, *, dataset_name: str, + llm: Llm, document: run_async_create_params.Variant1Document, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -106,9 +107,9 @@ def create( self, *, dataset_name: str, + llm: Llm, web: run_async_create_params.Variant2Web, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -138,9 +139,9 @@ def create( self, *, dataset_name: str, + llm: Llm, sec_filing: run_async_create_params.Variant3SecFiling, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -166,15 +167,18 @@ def create( ... @required_args( - ["dataset_name", "text"], ["dataset_name", "document"], ["dataset_name", "web"], ["dataset_name", "sec_filing"] + ["dataset_name", "llm", "text"], + ["dataset_name", "llm", "document"], + ["dataset_name", "llm", "web"], + ["dataset_name", "llm", "sec_filing"], ) def create( self, *, dataset_name: str, + llm: Llm, text: run_async_create_params.Variant0Text | NotGiven = NOT_GIVEN, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -204,8 +208,8 @@ def create( query=maybe_transform( { "dataset_name": dataset_name, - "custom_instruction": custom_instruction, "llm": llm, + "custom_instruction": custom_instruction, }, run_async_create_params.RunAsyncCreateParams, ), @@ -228,9 +232,9 @@ async def create( self, *, dataset_name: str, + llm: Llm, text: run_async_create_params.Variant0Text, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -260,9 +264,9 @@ async def create( self, *, dataset_name: str, + llm: Llm, document: run_async_create_params.Variant1Document, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -292,9 +296,9 @@ async def create( self, *, dataset_name: str, + llm: Llm, web: run_async_create_params.Variant2Web, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -324,9 +328,9 @@ async def create( self, *, dataset_name: str, + llm: Llm, sec_filing: run_async_create_params.Variant3SecFiling, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -352,15 +356,18 @@ async def create( ... @required_args( - ["dataset_name", "text"], ["dataset_name", "document"], ["dataset_name", "web"], ["dataset_name", "sec_filing"] + ["dataset_name", "llm", "text"], + ["dataset_name", "llm", "document"], + ["dataset_name", "llm", "web"], + ["dataset_name", "llm", "sec_filing"], ) async def create( self, *, dataset_name: str, + llm: Llm, text: run_async_create_params.Variant0Text | NotGiven = NOT_GIVEN, custom_instruction: Optional[str] | NotGiven = NOT_GIVEN, - llm: Optional[object] | 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, @@ -390,8 +397,8 @@ async def create( query=await async_maybe_transform( { "dataset_name": dataset_name, - "custom_instruction": custom_instruction, "llm": llm, + "custom_instruction": custom_instruction, }, run_async_create_params.RunAsyncCreateParams, ), diff --git a/src/structify/types/structure/__init__.py b/src/structify/types/structure/__init__.py index bb4ab5e5..607eb106 100644 --- a/src/structify/types/structure/__init__.py +++ b/src/structify/types/structure/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .llm import Llm as Llm from .is_complete import IsComplete as IsComplete from .run_create_params import RunCreateParams as RunCreateParams from .run_async_create_params import RunAsyncCreateParams as RunAsyncCreateParams diff --git a/src/structify/types/structure/llm.py b/src/structify/types/structure/llm.py new file mode 100644 index 00000000..4f7ecaf9 --- /dev/null +++ b/src/structify/types/structure/llm.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["Llm"] + +Llm = Literal["Gpt4V", "Structify", "Human"] diff --git a/src/structify/types/structure/run_async_create_params.py b/src/structify/types/structure/run_async_create_params.py index c56a5dad..72e396ea 100644 --- a/src/structify/types/structure/run_async_create_params.py +++ b/src/structify/types/structure/run_async_create_params.py @@ -5,6 +5,7 @@ from typing import Union, Optional from typing_extensions import Required, Annotated, TypedDict +from .llm import Llm from ..._utils import PropertyInfo __all__ = [ @@ -23,12 +24,12 @@ class Variant0(TypedDict, total=False): dataset_name: Required[str] + llm: Required[Llm] + text: Required[Annotated[Variant0Text, PropertyInfo(alias="Text")]] custom_instruction: Optional[str] - llm: Optional[object] - class Variant0Text(TypedDict, total=False): text_content: Required[str] @@ -37,12 +38,12 @@ class Variant0Text(TypedDict, total=False): class Variant1(TypedDict, total=False): dataset_name: Required[str] + llm: Required[Llm] + document: Required[Annotated[Variant1Document, PropertyInfo(alias="Document")]] custom_instruction: Optional[str] - llm: Optional[object] - class Variant1Document(TypedDict, total=False): path: Required[str] @@ -51,12 +52,12 @@ class Variant1Document(TypedDict, total=False): class Variant2(TypedDict, total=False): dataset_name: Required[str] + llm: Required[Llm] + web: Required[Annotated[Variant2Web, PropertyInfo(alias="Web")]] custom_instruction: Optional[str] - llm: Optional[object] - class Variant2Web(TypedDict, total=False): phrase: Required[str] @@ -67,12 +68,12 @@ class Variant2Web(TypedDict, total=False): class Variant3(TypedDict, total=False): dataset_name: Required[str] + llm: Required[Llm] + sec_filing: Required[Annotated[Variant3SecFiling, PropertyInfo(alias="SECFiling")]] custom_instruction: Optional[str] - llm: Optional[object] - class Variant3SecFiling(TypedDict, total=False): accession_number: Optional[str] diff --git a/src/structify/types/structure/run_create_params.py b/src/structify/types/structure/run_create_params.py index 62f559d1..d3d765f0 100644 --- a/src/structify/types/structure/run_create_params.py +++ b/src/structify/types/structure/run_create_params.py @@ -5,6 +5,7 @@ from typing import Union, Optional from typing_extensions import Required, Annotated, TypedDict +from .llm import Llm from ..._utils import PropertyInfo __all__ = [ @@ -23,12 +24,12 @@ class Variant0(TypedDict, total=False): dataset_name: Required[str] + llm: Required[Llm] + text: Required[Annotated[Variant0Text, PropertyInfo(alias="Text")]] custom_instruction: Optional[str] - llm: Optional[object] - class Variant0Text(TypedDict, total=False): text_content: Required[str] @@ -37,12 +38,12 @@ class Variant0Text(TypedDict, total=False): class Variant1(TypedDict, total=False): dataset_name: Required[str] + llm: Required[Llm] + document: Required[Annotated[Variant1Document, PropertyInfo(alias="Document")]] custom_instruction: Optional[str] - llm: Optional[object] - class Variant1Document(TypedDict, total=False): path: Required[str] @@ -51,12 +52,12 @@ class Variant1Document(TypedDict, total=False): class Variant2(TypedDict, total=False): dataset_name: Required[str] + llm: Required[Llm] + web: Required[Annotated[Variant2Web, PropertyInfo(alias="Web")]] custom_instruction: Optional[str] - llm: Optional[object] - class Variant2Web(TypedDict, total=False): phrase: Required[str] @@ -67,12 +68,12 @@ class Variant2Web(TypedDict, total=False): class Variant3(TypedDict, total=False): dataset_name: Required[str] + llm: Required[Llm] + sec_filing: Required[Annotated[Variant3SecFiling, PropertyInfo(alias="SECFiling")]] custom_instruction: Optional[str] - llm: Optional[object] - class Variant3SecFiling(TypedDict, total=False): accession_number: Optional[str] diff --git a/tests/api_resources/structure/test_run.py b/tests/api_resources/structure/test_run.py index d9eaa000..68f5e32b 100644 --- a/tests/api_resources/structure/test_run.py +++ b/tests/api_resources/structure/test_run.py @@ -20,6 +20,7 @@ class TestRun: def test_method_create_overload_1(self, client: Structify) -> None: run = client.structure.run.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, ) assert_matches_type(object, run, path=["response"]) @@ -28,9 +29,9 @@ def test_method_create_overload_1(self, client: Structify) -> None: def test_method_create_with_all_params_overload_1(self, client: Structify) -> None: run = client.structure.run.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, custom_instruction="string", - llm={}, ) assert_matches_type(object, run, path=["response"]) @@ -38,6 +39,7 @@ def test_method_create_with_all_params_overload_1(self, client: Structify) -> No def test_raw_response_create_overload_1(self, client: Structify) -> None: response = client.structure.run.with_raw_response.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, ) @@ -50,6 +52,7 @@ def test_raw_response_create_overload_1(self, client: Structify) -> None: def test_streaming_response_create_overload_1(self, client: Structify) -> None: with client.structure.run.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, ) as response: assert not response.is_closed @@ -64,6 +67,7 @@ def test_streaming_response_create_overload_1(self, client: Structify) -> None: def test_method_create_overload_2(self, client: Structify) -> None: run = client.structure.run.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, ) assert_matches_type(object, run, path=["response"]) @@ -72,9 +76,9 @@ def test_method_create_overload_2(self, client: Structify) -> None: def test_method_create_with_all_params_overload_2(self, client: Structify) -> None: run = client.structure.run.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, custom_instruction="string", - llm={}, ) assert_matches_type(object, run, path=["response"]) @@ -82,6 +86,7 @@ def test_method_create_with_all_params_overload_2(self, client: Structify) -> No def test_raw_response_create_overload_2(self, client: Structify) -> None: response = client.structure.run.with_raw_response.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, ) @@ -94,6 +99,7 @@ def test_raw_response_create_overload_2(self, client: Structify) -> None: def test_streaming_response_create_overload_2(self, client: Structify) -> None: with client.structure.run.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, ) as response: assert not response.is_closed @@ -108,6 +114,7 @@ def test_streaming_response_create_overload_2(self, client: Structify) -> None: def test_method_create_overload_3(self, client: Structify) -> None: run = client.structure.run.create( dataset_name="string", + llm="Gpt4V", web={"phrase": "string"}, ) assert_matches_type(object, run, path=["response"]) @@ -116,12 +123,12 @@ def test_method_create_overload_3(self, client: Structify) -> None: def test_method_create_with_all_params_overload_3(self, client: Structify) -> None: run = client.structure.run.create( dataset_name="string", + llm="Gpt4V", web={ "phrase": "string", "starting_website": "string", }, custom_instruction="string", - llm={}, ) assert_matches_type(object, run, path=["response"]) @@ -129,6 +136,7 @@ def test_method_create_with_all_params_overload_3(self, client: Structify) -> No def test_raw_response_create_overload_3(self, client: Structify) -> None: response = client.structure.run.with_raw_response.create( dataset_name="string", + llm="Gpt4V", web={"phrase": "string"}, ) @@ -141,6 +149,7 @@ def test_raw_response_create_overload_3(self, client: Structify) -> None: def test_streaming_response_create_overload_3(self, client: Structify) -> None: with client.structure.run.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", web={"phrase": "string"}, ) as response: assert not response.is_closed @@ -155,6 +164,7 @@ def test_streaming_response_create_overload_3(self, client: Structify) -> None: def test_method_create_overload_4(self, client: Structify) -> None: run = client.structure.run.create( dataset_name="string", + llm="Gpt4V", sec_filing={}, ) assert_matches_type(object, run, path=["response"]) @@ -163,13 +173,13 @@ def test_method_create_overload_4(self, client: Structify) -> None: def test_method_create_with_all_params_overload_4(self, client: Structify) -> None: run = client.structure.run.create( dataset_name="string", + llm="Gpt4V", sec_filing={ "accession_number": "string", "quarter": 0, "year": 0, }, custom_instruction="string", - llm={}, ) assert_matches_type(object, run, path=["response"]) @@ -177,6 +187,7 @@ def test_method_create_with_all_params_overload_4(self, client: Structify) -> No def test_raw_response_create_overload_4(self, client: Structify) -> None: response = client.structure.run.with_raw_response.create( dataset_name="string", + llm="Gpt4V", sec_filing={}, ) @@ -189,6 +200,7 @@ def test_raw_response_create_overload_4(self, client: Structify) -> None: def test_streaming_response_create_overload_4(self, client: Structify) -> None: with client.structure.run.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", sec_filing={}, ) as response: assert not response.is_closed @@ -207,6 +219,7 @@ class TestAsyncRun: async def test_method_create_overload_1(self, async_client: AsyncStructify) -> None: run = await async_client.structure.run.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, ) assert_matches_type(object, run, path=["response"]) @@ -215,9 +228,9 @@ async def test_method_create_overload_1(self, async_client: AsyncStructify) -> N async def test_method_create_with_all_params_overload_1(self, async_client: AsyncStructify) -> None: run = await async_client.structure.run.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, custom_instruction="string", - llm={}, ) assert_matches_type(object, run, path=["response"]) @@ -225,6 +238,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn async def test_raw_response_create_overload_1(self, async_client: AsyncStructify) -> None: response = await async_client.structure.run.with_raw_response.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, ) @@ -237,6 +251,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncStructify async def test_streaming_response_create_overload_1(self, async_client: AsyncStructify) -> None: async with async_client.structure.run.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, ) as response: assert not response.is_closed @@ -251,6 +266,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncStr async def test_method_create_overload_2(self, async_client: AsyncStructify) -> None: run = await async_client.structure.run.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, ) assert_matches_type(object, run, path=["response"]) @@ -259,9 +275,9 @@ async def test_method_create_overload_2(self, async_client: AsyncStructify) -> N async def test_method_create_with_all_params_overload_2(self, async_client: AsyncStructify) -> None: run = await async_client.structure.run.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, custom_instruction="string", - llm={}, ) assert_matches_type(object, run, path=["response"]) @@ -269,6 +285,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn async def test_raw_response_create_overload_2(self, async_client: AsyncStructify) -> None: response = await async_client.structure.run.with_raw_response.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, ) @@ -281,6 +298,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncStructify async def test_streaming_response_create_overload_2(self, async_client: AsyncStructify) -> None: async with async_client.structure.run.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, ) as response: assert not response.is_closed @@ -295,6 +313,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncStr async def test_method_create_overload_3(self, async_client: AsyncStructify) -> None: run = await async_client.structure.run.create( dataset_name="string", + llm="Gpt4V", web={"phrase": "string"}, ) assert_matches_type(object, run, path=["response"]) @@ -303,12 +322,12 @@ async def test_method_create_overload_3(self, async_client: AsyncStructify) -> N async def test_method_create_with_all_params_overload_3(self, async_client: AsyncStructify) -> None: run = await async_client.structure.run.create( dataset_name="string", + llm="Gpt4V", web={ "phrase": "string", "starting_website": "string", }, custom_instruction="string", - llm={}, ) assert_matches_type(object, run, path=["response"]) @@ -316,6 +335,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn async def test_raw_response_create_overload_3(self, async_client: AsyncStructify) -> None: response = await async_client.structure.run.with_raw_response.create( dataset_name="string", + llm="Gpt4V", web={"phrase": "string"}, ) @@ -328,6 +348,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncStructify async def test_streaming_response_create_overload_3(self, async_client: AsyncStructify) -> None: async with async_client.structure.run.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", web={"phrase": "string"}, ) as response: assert not response.is_closed @@ -342,6 +363,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncStr async def test_method_create_overload_4(self, async_client: AsyncStructify) -> None: run = await async_client.structure.run.create( dataset_name="string", + llm="Gpt4V", sec_filing={}, ) assert_matches_type(object, run, path=["response"]) @@ -350,13 +372,13 @@ async def test_method_create_overload_4(self, async_client: AsyncStructify) -> N async def test_method_create_with_all_params_overload_4(self, async_client: AsyncStructify) -> None: run = await async_client.structure.run.create( dataset_name="string", + llm="Gpt4V", sec_filing={ "accession_number": "string", "quarter": 0, "year": 0, }, custom_instruction="string", - llm={}, ) assert_matches_type(object, run, path=["response"]) @@ -364,6 +386,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn async def test_raw_response_create_overload_4(self, async_client: AsyncStructify) -> None: response = await async_client.structure.run.with_raw_response.create( dataset_name="string", + llm="Gpt4V", sec_filing={}, ) @@ -376,6 +399,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncStructify async def test_streaming_response_create_overload_4(self, async_client: AsyncStructify) -> None: async with async_client.structure.run.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", sec_filing={}, ) as response: assert not response.is_closed diff --git a/tests/api_resources/structure/test_run_async.py b/tests/api_resources/structure/test_run_async.py index 9ecc154c..852f2a16 100644 --- a/tests/api_resources/structure/test_run_async.py +++ b/tests/api_resources/structure/test_run_async.py @@ -20,6 +20,7 @@ class TestRunAsync: def test_method_create_overload_1(self, client: Structify) -> None: run_async = client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, ) assert_matches_type(object, run_async, path=["response"]) @@ -28,9 +29,9 @@ def test_method_create_overload_1(self, client: Structify) -> None: def test_method_create_with_all_params_overload_1(self, client: Structify) -> None: run_async = client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, custom_instruction="string", - llm={}, ) assert_matches_type(object, run_async, path=["response"]) @@ -38,6 +39,7 @@ def test_method_create_with_all_params_overload_1(self, client: Structify) -> No def test_raw_response_create_overload_1(self, client: Structify) -> None: response = client.structure.run_async.with_raw_response.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, ) @@ -50,6 +52,7 @@ def test_raw_response_create_overload_1(self, client: Structify) -> None: def test_streaming_response_create_overload_1(self, client: Structify) -> None: with client.structure.run_async.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, ) as response: assert not response.is_closed @@ -64,6 +67,7 @@ def test_streaming_response_create_overload_1(self, client: Structify) -> None: def test_method_create_overload_2(self, client: Structify) -> None: run_async = client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, ) assert_matches_type(object, run_async, path=["response"]) @@ -72,9 +76,9 @@ def test_method_create_overload_2(self, client: Structify) -> None: def test_method_create_with_all_params_overload_2(self, client: Structify) -> None: run_async = client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, custom_instruction="string", - llm={}, ) assert_matches_type(object, run_async, path=["response"]) @@ -82,6 +86,7 @@ def test_method_create_with_all_params_overload_2(self, client: Structify) -> No def test_raw_response_create_overload_2(self, client: Structify) -> None: response = client.structure.run_async.with_raw_response.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, ) @@ -94,6 +99,7 @@ def test_raw_response_create_overload_2(self, client: Structify) -> None: def test_streaming_response_create_overload_2(self, client: Structify) -> None: with client.structure.run_async.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, ) as response: assert not response.is_closed @@ -108,6 +114,7 @@ def test_streaming_response_create_overload_2(self, client: Structify) -> None: def test_method_create_overload_3(self, client: Structify) -> None: run_async = client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", web={"phrase": "string"}, ) assert_matches_type(object, run_async, path=["response"]) @@ -116,12 +123,12 @@ def test_method_create_overload_3(self, client: Structify) -> None: def test_method_create_with_all_params_overload_3(self, client: Structify) -> None: run_async = client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", web={ "phrase": "string", "starting_website": "string", }, custom_instruction="string", - llm={}, ) assert_matches_type(object, run_async, path=["response"]) @@ -129,6 +136,7 @@ def test_method_create_with_all_params_overload_3(self, client: Structify) -> No def test_raw_response_create_overload_3(self, client: Structify) -> None: response = client.structure.run_async.with_raw_response.create( dataset_name="string", + llm="Gpt4V", web={"phrase": "string"}, ) @@ -141,6 +149,7 @@ def test_raw_response_create_overload_3(self, client: Structify) -> None: def test_streaming_response_create_overload_3(self, client: Structify) -> None: with client.structure.run_async.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", web={"phrase": "string"}, ) as response: assert not response.is_closed @@ -155,6 +164,7 @@ def test_streaming_response_create_overload_3(self, client: Structify) -> None: def test_method_create_overload_4(self, client: Structify) -> None: run_async = client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", sec_filing={}, ) assert_matches_type(object, run_async, path=["response"]) @@ -163,13 +173,13 @@ def test_method_create_overload_4(self, client: Structify) -> None: def test_method_create_with_all_params_overload_4(self, client: Structify) -> None: run_async = client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", sec_filing={ "accession_number": "string", "quarter": 0, "year": 0, }, custom_instruction="string", - llm={}, ) assert_matches_type(object, run_async, path=["response"]) @@ -177,6 +187,7 @@ def test_method_create_with_all_params_overload_4(self, client: Structify) -> No def test_raw_response_create_overload_4(self, client: Structify) -> None: response = client.structure.run_async.with_raw_response.create( dataset_name="string", + llm="Gpt4V", sec_filing={}, ) @@ -189,6 +200,7 @@ def test_raw_response_create_overload_4(self, client: Structify) -> None: def test_streaming_response_create_overload_4(self, client: Structify) -> None: with client.structure.run_async.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", sec_filing={}, ) as response: assert not response.is_closed @@ -207,6 +219,7 @@ class TestAsyncRunAsync: async def test_method_create_overload_1(self, async_client: AsyncStructify) -> None: run_async = await async_client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, ) assert_matches_type(object, run_async, path=["response"]) @@ -215,9 +228,9 @@ async def test_method_create_overload_1(self, async_client: AsyncStructify) -> N async def test_method_create_with_all_params_overload_1(self, async_client: AsyncStructify) -> None: run_async = await async_client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, custom_instruction="string", - llm={}, ) assert_matches_type(object, run_async, path=["response"]) @@ -225,6 +238,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn async def test_raw_response_create_overload_1(self, async_client: AsyncStructify) -> None: response = await async_client.structure.run_async.with_raw_response.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, ) @@ -237,6 +251,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncStructify async def test_streaming_response_create_overload_1(self, async_client: AsyncStructify) -> None: async with async_client.structure.run_async.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", text={"text_content": "string"}, ) as response: assert not response.is_closed @@ -251,6 +266,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncStr async def test_method_create_overload_2(self, async_client: AsyncStructify) -> None: run_async = await async_client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, ) assert_matches_type(object, run_async, path=["response"]) @@ -259,9 +275,9 @@ async def test_method_create_overload_2(self, async_client: AsyncStructify) -> N async def test_method_create_with_all_params_overload_2(self, async_client: AsyncStructify) -> None: run_async = await async_client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, custom_instruction="string", - llm={}, ) assert_matches_type(object, run_async, path=["response"]) @@ -269,6 +285,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn async def test_raw_response_create_overload_2(self, async_client: AsyncStructify) -> None: response = await async_client.structure.run_async.with_raw_response.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, ) @@ -281,6 +298,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncStructify async def test_streaming_response_create_overload_2(self, async_client: AsyncStructify) -> None: async with async_client.structure.run_async.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", document={"path": "string"}, ) as response: assert not response.is_closed @@ -295,6 +313,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncStr async def test_method_create_overload_3(self, async_client: AsyncStructify) -> None: run_async = await async_client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", web={"phrase": "string"}, ) assert_matches_type(object, run_async, path=["response"]) @@ -303,12 +322,12 @@ async def test_method_create_overload_3(self, async_client: AsyncStructify) -> N async def test_method_create_with_all_params_overload_3(self, async_client: AsyncStructify) -> None: run_async = await async_client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", web={ "phrase": "string", "starting_website": "string", }, custom_instruction="string", - llm={}, ) assert_matches_type(object, run_async, path=["response"]) @@ -316,6 +335,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn async def test_raw_response_create_overload_3(self, async_client: AsyncStructify) -> None: response = await async_client.structure.run_async.with_raw_response.create( dataset_name="string", + llm="Gpt4V", web={"phrase": "string"}, ) @@ -328,6 +348,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncStructify async def test_streaming_response_create_overload_3(self, async_client: AsyncStructify) -> None: async with async_client.structure.run_async.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", web={"phrase": "string"}, ) as response: assert not response.is_closed @@ -342,6 +363,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncStr async def test_method_create_overload_4(self, async_client: AsyncStructify) -> None: run_async = await async_client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", sec_filing={}, ) assert_matches_type(object, run_async, path=["response"]) @@ -350,13 +372,13 @@ async def test_method_create_overload_4(self, async_client: AsyncStructify) -> N async def test_method_create_with_all_params_overload_4(self, async_client: AsyncStructify) -> None: run_async = await async_client.structure.run_async.create( dataset_name="string", + llm="Gpt4V", sec_filing={ "accession_number": "string", "quarter": 0, "year": 0, }, custom_instruction="string", - llm={}, ) assert_matches_type(object, run_async, path=["response"]) @@ -364,6 +386,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn async def test_raw_response_create_overload_4(self, async_client: AsyncStructify) -> None: response = await async_client.structure.run_async.with_raw_response.create( dataset_name="string", + llm="Gpt4V", sec_filing={}, ) @@ -376,6 +399,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncStructify async def test_streaming_response_create_overload_4(self, async_client: AsyncStructify) -> None: async with async_client.structure.run_async.with_streaming_response.create( dataset_name="string", + llm="Gpt4V", sec_filing={}, ) as response: assert not response.is_closed