diff --git a/.stats.yml b/.stats.yml index 0fe8319d..a871eb2b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-885b7738bc5f69e484fd0738024e7560f5f5448aee76017f27e78e1fe2485ae0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-6c24c5c093c6eaaba26ce7b3960df8f01ed2a9d425f92b9bae0e1bc78105bea4.yml diff --git a/src/structify/resources/datasets.py b/src/structify/resources/datasets.py index aeb197cf..4a2dce17 100644 --- a/src/structify/resources/datasets.py +++ b/src/structify/resources/datasets.py @@ -206,6 +206,7 @@ def match( *, dataset: str, query_kg: KnowledgeGraphParam, + match_threshold: float | 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, @@ -237,6 +238,7 @@ def match( { "dataset": dataset, "query_kg": query_kg, + "match_threshold": match_threshold, }, dataset_match_params.DatasetMatchParams, ), @@ -562,6 +564,7 @@ async def match( *, dataset: str, query_kg: KnowledgeGraphParam, + match_threshold: float | 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, @@ -593,6 +596,7 @@ async def match( { "dataset": dataset, "query_kg": query_kg, + "match_threshold": match_threshold, }, dataset_match_params.DatasetMatchParams, ), diff --git a/src/structify/types/dataset_match_params.py b/src/structify/types/dataset_match_params.py index de5dccd7..45e1c113 100644 --- a/src/structify/types/dataset_match_params.py +++ b/src/structify/types/dataset_match_params.py @@ -19,3 +19,5 @@ class DatasetMatchParams(TypedDict, total=False): that the LLM outputs. Also the first representation of an LLM output in the pipeline from raw tool output to being merged into a Neo4j DB """ + + match_threshold: float diff --git a/src/structify/types/dataset_match_response.py b/src/structify/types/dataset_match_response.py index 7cc05d89..c760f5f9 100644 --- a/src/structify/types/dataset_match_response.py +++ b/src/structify/types/dataset_match_response.py @@ -1,28 +1,12 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Union -from datetime import datetime -from typing_extensions import TypeAlias -from .image import Image from .._models import BaseModel -__all__ = ["DatasetMatchResponse", "Entity", "EntityProperties"] - -EntityProperties: TypeAlias = Union[str, bool, float, Image] - - -class Entity(BaseModel): - id: str - - creation_time: datetime - - label: str - - properties: Dict[str, EntityProperties] +__all__ = ["DatasetMatchResponse"] class DatasetMatchResponse(BaseModel): - entity: Entity + entity: str score: float diff --git a/tests/api_resources/test_datasets.py b/tests/api_resources/test_datasets.py index 66b34cb4..96329714 100644 --- a/tests/api_resources/test_datasets.py +++ b/tests/api_resources/test_datasets.py @@ -236,6 +236,7 @@ def test_method_match_with_all_params(self, client: Structify) -> None: } ], }, + match_threshold=0, ) assert_matches_type(DatasetMatchResponse, dataset, path=["response"]) @@ -617,6 +618,7 @@ async def test_method_match_with_all_params(self, async_client: AsyncStructify) } ], }, + match_threshold=0, ) assert_matches_type(DatasetMatchResponse, dataset, path=["response"])