Skip to content

Commit 0a612c8

Browse files
feat(api): add tlm routes (#79)
1 parent ff6f890 commit 0a612c8

17 files changed

+1515
-2
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 34
1+
configured_endpoints: 37

api.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,18 @@ Methods:
119119

120120
- <code title="get /api/users/myself/organizations">client.users.myself.organizations.<a href="./src/codex/resources/users/myself/organizations.py">list</a>() -> <a href="./src/codex/types/users/myself/user_organizations_schema.py">UserOrganizationsSchema</a></code>
121121

122+
## Verification
123+
124+
Types:
125+
126+
```python
127+
from codex.types.users import VerificationResendResponse
128+
```
129+
130+
Methods:
131+
132+
- <code title="post /api/users/verification/resend">client.users.verification.<a href="./src/codex/resources/users/verification.py">resend</a>() -> <a href="./src/codex/types/users/verification_resend_response.py">VerificationResendResponse</a></code>
133+
122134
# Projects
123135

124136
Types:
@@ -175,3 +187,16 @@ Methods:
175187
- <code title="delete /api/projects/{project_id}/entries/{entry_id}">client.projects.entries.<a href="./src/codex/resources/projects/entries.py">delete</a>(entry_id, \*, project_id) -> None</code>
176188
- <code title="post /api/projects/{project_id}/entries/add_question">client.projects.entries.<a href="./src/codex/resources/projects/entries.py">add_question</a>(project_id, \*\*<a href="src/codex/types/projects/entry_add_question_params.py">params</a>) -> <a href="./src/codex/types/projects/entry.py">Entry</a></code>
177189
- <code title="post /api/projects/{project_id}/entries/query">client.projects.entries.<a href="./src/codex/resources/projects/entries.py">query</a>(project_id, \*\*<a href="src/codex/types/projects/entry_query_params.py">params</a>) -> <a href="./src/codex/types/projects/entry.py">Optional[Entry]</a></code>
190+
191+
# Tlm
192+
193+
Types:
194+
195+
```python
196+
from codex.types import TlmPromptResponse, TlmScoreResponse
197+
```
198+
199+
Methods:
200+
201+
- <code title="post /api/tlm/prompt">client.tlm.<a href="./src/codex/resources/tlm.py">prompt</a>(\*\*<a href="src/codex/types/tlm_prompt_params.py">params</a>) -> <a href="./src/codex/types/tlm_prompt_response.py">TlmPromptResponse</a></code>
202+
- <code title="post /api/tlm/score">client.tlm.<a href="./src/codex/resources/tlm.py">score</a>(\*\*<a href="src/codex/types/tlm_score_params.py">params</a>) -> <a href="./src/codex/types/tlm_score_response.py">TlmScoreResponse</a></code>

src/codex/_client.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
get_async_library,
2626
)
2727
from ._version import __version__
28-
from .resources import health
28+
from .resources import tlm, health
2929
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
3030
from ._exceptions import APIStatusError
3131
from ._base_client import (
@@ -61,6 +61,7 @@ class Codex(SyncAPIClient):
6161
organizations: organizations.OrganizationsResource
6262
users: users.UsersResource
6363
projects: projects.ProjectsResource
64+
tlm: tlm.TlmResource
6465
with_raw_response: CodexWithRawResponse
6566
with_streaming_response: CodexWithStreamedResponse
6667

@@ -141,6 +142,7 @@ def __init__(
141142
self.organizations = organizations.OrganizationsResource(self)
142143
self.users = users.UsersResource(self)
143144
self.projects = projects.ProjectsResource(self)
145+
self.tlm = tlm.TlmResource(self)
144146
self.with_raw_response = CodexWithRawResponse(self)
145147
self.with_streaming_response = CodexWithStreamedResponse(self)
146148

@@ -291,6 +293,7 @@ class AsyncCodex(AsyncAPIClient):
291293
organizations: organizations.AsyncOrganizationsResource
292294
users: users.AsyncUsersResource
293295
projects: projects.AsyncProjectsResource
296+
tlm: tlm.AsyncTlmResource
294297
with_raw_response: AsyncCodexWithRawResponse
295298
with_streaming_response: AsyncCodexWithStreamedResponse
296299

@@ -371,6 +374,7 @@ def __init__(
371374
self.organizations = organizations.AsyncOrganizationsResource(self)
372375
self.users = users.AsyncUsersResource(self)
373376
self.projects = projects.AsyncProjectsResource(self)
377+
self.tlm = tlm.AsyncTlmResource(self)
374378
self.with_raw_response = AsyncCodexWithRawResponse(self)
375379
self.with_streaming_response = AsyncCodexWithStreamedResponse(self)
376380

@@ -522,6 +526,7 @@ def __init__(self, client: Codex) -> None:
522526
self.organizations = organizations.OrganizationsResourceWithRawResponse(client.organizations)
523527
self.users = users.UsersResourceWithRawResponse(client.users)
524528
self.projects = projects.ProjectsResourceWithRawResponse(client.projects)
529+
self.tlm = tlm.TlmResourceWithRawResponse(client.tlm)
525530

526531

527532
class AsyncCodexWithRawResponse:
@@ -530,6 +535,7 @@ def __init__(self, client: AsyncCodex) -> None:
530535
self.organizations = organizations.AsyncOrganizationsResourceWithRawResponse(client.organizations)
531536
self.users = users.AsyncUsersResourceWithRawResponse(client.users)
532537
self.projects = projects.AsyncProjectsResourceWithRawResponse(client.projects)
538+
self.tlm = tlm.AsyncTlmResourceWithRawResponse(client.tlm)
533539

534540

535541
class CodexWithStreamedResponse:
@@ -538,6 +544,7 @@ def __init__(self, client: Codex) -> None:
538544
self.organizations = organizations.OrganizationsResourceWithStreamingResponse(client.organizations)
539545
self.users = users.UsersResourceWithStreamingResponse(client.users)
540546
self.projects = projects.ProjectsResourceWithStreamingResponse(client.projects)
547+
self.tlm = tlm.TlmResourceWithStreamingResponse(client.tlm)
541548

542549

543550
class AsyncCodexWithStreamedResponse:
@@ -546,6 +553,7 @@ def __init__(self, client: AsyncCodex) -> None:
546553
self.organizations = organizations.AsyncOrganizationsResourceWithStreamingResponse(client.organizations)
547554
self.users = users.AsyncUsersResourceWithStreamingResponse(client.users)
548555
self.projects = projects.AsyncProjectsResourceWithStreamingResponse(client.projects)
556+
self.tlm = tlm.AsyncTlmResourceWithStreamingResponse(client.tlm)
549557

550558

551559
Client = Codex

src/codex/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 .tlm import (
4+
TlmResource,
5+
AsyncTlmResource,
6+
TlmResourceWithRawResponse,
7+
AsyncTlmResourceWithRawResponse,
8+
TlmResourceWithStreamingResponse,
9+
AsyncTlmResourceWithStreamingResponse,
10+
)
311
from .users import (
412
UsersResource,
513
AsyncUsersResource,
@@ -58,4 +66,10 @@
5866
"AsyncProjectsResourceWithRawResponse",
5967
"ProjectsResourceWithStreamingResponse",
6068
"AsyncProjectsResourceWithStreamingResponse",
69+
"TlmResource",
70+
"AsyncTlmResource",
71+
"TlmResourceWithRawResponse",
72+
"AsyncTlmResourceWithRawResponse",
73+
"TlmResourceWithStreamingResponse",
74+
"AsyncTlmResourceWithStreamingResponse",
6175
]

0 commit comments

Comments
 (0)