Skip to content

Commit 427d1d3

Browse files
feat(api): fix missing endpoint
1 parent d403264 commit 427d1d3

11 files changed

Lines changed: 587 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 16
1+
configured_endpoints: 17
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/not-diamond-dragos199993%2Fnot-diamond-76d84ad8b4d68f7470a24f0f938d10318ecc1f16b86ca654c1644065c13e413a.yml
33
openapi_spec_hash: 92030c9eb965278da586919e9c7375b3
4-
config_hash: e152f4fd3c576ca64c68ee9f94105525
4+
config_hash: 0dbf3c6b30eede76ffb01f86b59ac672

api.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,11 @@ from not_diamond.types import ModelListResponse
7575
Methods:
7676

7777
- <code title="get /v2/models">client.models.<a href="./src/not_diamond/resources/models.py">list</a>(\*\*<a href="src/not_diamond/types/model_list_params.py">params</a>) -> <a href="./src/not_diamond/types/model_list_response.py">ModelListResponse</a></code>
78+
79+
# Client
80+
81+
## Report
82+
83+
Methods:
84+
85+
- <code title="post /v2/report/hallucination">client.client.report.<a href="./src/not_diamond/resources/client/report.py">evaluate_hallucination</a>(\*\*<a href="src/not_diamond/types/client/report_evaluate_hallucination_params.py">params</a>) -> object</code>

src/not_diamond/_client.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
SyncAPIClient,
3131
AsyncAPIClient,
3232
)
33+
from .resources.client import client
3334

3435
__all__ = [
3536
"Timeout",
@@ -49,6 +50,7 @@ class NotDiamond(SyncAPIClient):
4950
prompt_adaptation: prompt_adaptation.PromptAdaptationResource
5051
report: report.ReportResource
5152
models: models.ModelsResource
53+
client: client.ClientResource
5254
with_raw_response: NotDiamondWithRawResponse
5355
with_streaming_response: NotDiamondWithStreamedResponse
5456

@@ -107,6 +109,7 @@ def __init__(
107109
self.prompt_adaptation = prompt_adaptation.PromptAdaptationResource(self)
108110
self.report = report.ReportResource(self)
109111
self.models = models.ModelsResource(self)
112+
self.client = client.ClientResource(self)
110113
self.with_raw_response = NotDiamondWithRawResponse(self)
111114
self.with_streaming_response = NotDiamondWithStreamedResponse(self)
112115

@@ -234,6 +237,7 @@ class AsyncNotDiamond(AsyncAPIClient):
234237
prompt_adaptation: prompt_adaptation.AsyncPromptAdaptationResource
235238
report: report.AsyncReportResource
236239
models: models.AsyncModelsResource
240+
client: client.AsyncClientResource
237241
with_raw_response: AsyncNotDiamondWithRawResponse
238242
with_streaming_response: AsyncNotDiamondWithStreamedResponse
239243

@@ -292,6 +296,7 @@ def __init__(
292296
self.prompt_adaptation = prompt_adaptation.AsyncPromptAdaptationResource(self)
293297
self.report = report.AsyncReportResource(self)
294298
self.models = models.AsyncModelsResource(self)
299+
self.client = client.AsyncClientResource(self)
295300
self.with_raw_response = AsyncNotDiamondWithRawResponse(self)
296301
self.with_streaming_response = AsyncNotDiamondWithStreamedResponse(self)
297302

@@ -420,6 +425,7 @@ def __init__(self, client: NotDiamond) -> None:
420425
self.prompt_adaptation = prompt_adaptation.PromptAdaptationResourceWithRawResponse(client.prompt_adaptation)
421426
self.report = report.ReportResourceWithRawResponse(client.report)
422427
self.models = models.ModelsResourceWithRawResponse(client.models)
428+
self.client = client.ClientResourceWithRawResponse(client.client)
423429

424430

425431
class AsyncNotDiamondWithRawResponse:
@@ -431,6 +437,7 @@ def __init__(self, client: AsyncNotDiamond) -> None:
431437
)
432438
self.report = report.AsyncReportResourceWithRawResponse(client.report)
433439
self.models = models.AsyncModelsResourceWithRawResponse(client.models)
440+
self.client = client.AsyncClientResourceWithRawResponse(client.client)
434441

435442

436443
class NotDiamondWithStreamedResponse:
@@ -442,6 +449,7 @@ def __init__(self, client: NotDiamond) -> None:
442449
)
443450
self.report = report.ReportResourceWithStreamingResponse(client.report)
444451
self.models = models.ModelsResourceWithStreamingResponse(client.models)
452+
self.client = client.ClientResourceWithStreamingResponse(client.client)
445453

446454

447455
class AsyncNotDiamondWithStreamedResponse:
@@ -453,6 +461,7 @@ def __init__(self, client: AsyncNotDiamond) -> None:
453461
)
454462
self.report = report.AsyncReportResourceWithStreamingResponse(client.report)
455463
self.models = models.AsyncModelsResourceWithStreamingResponse(client.models)
464+
self.client = client.AsyncClientResourceWithStreamingResponse(client.client)
456465

457466

458467
Client = NotDiamond

src/not_diamond/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from .client import (
4+
ClientResource,
5+
AsyncClientResource,
6+
ClientResourceWithRawResponse,
7+
AsyncClientResourceWithRawResponse,
8+
ClientResourceWithStreamingResponse,
9+
AsyncClientResourceWithStreamingResponse,
10+
)
311
from .models import (
412
ModelsResource,
513
AsyncModelsResource,
@@ -72,4 +80,10 @@
7280
"AsyncModelsResourceWithRawResponse",
7381
"ModelsResourceWithStreamingResponse",
7482
"AsyncModelsResourceWithStreamingResponse",
83+
"ClientResource",
84+
"AsyncClientResource",
85+
"ClientResourceWithRawResponse",
86+
"AsyncClientResourceWithRawResponse",
87+
"ClientResourceWithStreamingResponse",
88+
"AsyncClientResourceWithStreamingResponse",
7589
]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .client import (
4+
ClientResource,
5+
AsyncClientResource,
6+
ClientResourceWithRawResponse,
7+
AsyncClientResourceWithRawResponse,
8+
ClientResourceWithStreamingResponse,
9+
AsyncClientResourceWithStreamingResponse,
10+
)
11+
from .report import (
12+
ReportResource,
13+
AsyncReportResource,
14+
ReportResourceWithRawResponse,
15+
AsyncReportResourceWithRawResponse,
16+
ReportResourceWithStreamingResponse,
17+
AsyncReportResourceWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"ReportResource",
22+
"AsyncReportResource",
23+
"ReportResourceWithRawResponse",
24+
"AsyncReportResourceWithRawResponse",
25+
"ReportResourceWithStreamingResponse",
26+
"AsyncReportResourceWithStreamingResponse",
27+
"ClientResource",
28+
"AsyncClientResource",
29+
"ClientResourceWithRawResponse",
30+
"AsyncClientResourceWithRawResponse",
31+
"ClientResourceWithStreamingResponse",
32+
"AsyncClientResourceWithStreamingResponse",
33+
]
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from .report import (
6+
ReportResource,
7+
AsyncReportResource,
8+
ReportResourceWithRawResponse,
9+
AsyncReportResourceWithRawResponse,
10+
ReportResourceWithStreamingResponse,
11+
AsyncReportResourceWithStreamingResponse,
12+
)
13+
from ..._compat import cached_property
14+
from ..._resource import SyncAPIResource, AsyncAPIResource
15+
16+
__all__ = ["ClientResource", "AsyncClientResource"]
17+
18+
19+
class ClientResource(SyncAPIResource):
20+
@cached_property
21+
def report(self) -> ReportResource:
22+
return ReportResource(self._client)
23+
24+
@cached_property
25+
def with_raw_response(self) -> ClientResourceWithRawResponse:
26+
"""
27+
This property can be used as a prefix for any HTTP method call to return
28+
the raw response object instead of the parsed content.
29+
30+
For more information, see https://www.github.com/Not-Diamond/not-diamond-python#accessing-raw-response-data-eg-headers
31+
"""
32+
return ClientResourceWithRawResponse(self)
33+
34+
@cached_property
35+
def with_streaming_response(self) -> ClientResourceWithStreamingResponse:
36+
"""
37+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38+
39+
For more information, see https://www.github.com/Not-Diamond/not-diamond-python#with_streaming_response
40+
"""
41+
return ClientResourceWithStreamingResponse(self)
42+
43+
44+
class AsyncClientResource(AsyncAPIResource):
45+
@cached_property
46+
def report(self) -> AsyncReportResource:
47+
return AsyncReportResource(self._client)
48+
49+
@cached_property
50+
def with_raw_response(self) -> AsyncClientResourceWithRawResponse:
51+
"""
52+
This property can be used as a prefix for any HTTP method call to return
53+
the raw response object instead of the parsed content.
54+
55+
For more information, see https://www.github.com/Not-Diamond/not-diamond-python#accessing-raw-response-data-eg-headers
56+
"""
57+
return AsyncClientResourceWithRawResponse(self)
58+
59+
@cached_property
60+
def with_streaming_response(self) -> AsyncClientResourceWithStreamingResponse:
61+
"""
62+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
63+
64+
For more information, see https://www.github.com/Not-Diamond/not-diamond-python#with_streaming_response
65+
"""
66+
return AsyncClientResourceWithStreamingResponse(self)
67+
68+
69+
class ClientResourceWithRawResponse:
70+
def __init__(self, client: ClientResource) -> None:
71+
self._client = client
72+
73+
@cached_property
74+
def report(self) -> ReportResourceWithRawResponse:
75+
return ReportResourceWithRawResponse(self._client.report)
76+
77+
78+
class AsyncClientResourceWithRawResponse:
79+
def __init__(self, client: AsyncClientResource) -> None:
80+
self._client = client
81+
82+
@cached_property
83+
def report(self) -> AsyncReportResourceWithRawResponse:
84+
return AsyncReportResourceWithRawResponse(self._client.report)
85+
86+
87+
class ClientResourceWithStreamingResponse:
88+
def __init__(self, client: ClientResource) -> None:
89+
self._client = client
90+
91+
@cached_property
92+
def report(self) -> ReportResourceWithStreamingResponse:
93+
return ReportResourceWithStreamingResponse(self._client.report)
94+
95+
96+
class AsyncClientResourceWithStreamingResponse:
97+
def __init__(self, client: AsyncClientResource) -> None:
98+
self._client = client
99+
100+
@cached_property
101+
def report(self) -> AsyncReportResourceWithStreamingResponse:
102+
return AsyncReportResourceWithStreamingResponse(self._client.report)

0 commit comments

Comments
 (0)