Skip to content

Commit 3b745af

Browse files
feat(api): api update
1 parent d9ffa38 commit 3b745af

File tree

5 files changed

+11
-75
lines changed

5 files changed

+11
-75
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
configured_endpoints: 55
2-
openapi_spec_hash: b260cce23d53dba37b982654e7928405
2+
openapi_spec_hash: 3d3361adb6a836f42a49850b5aea1df5
33
config_hash: bed87752f4056d0c4bf2ddf856307800

src/codex/resources/projects/query_logs.py

Lines changed: 4 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,7 @@ def list(
115115
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "ungrounded"]]
116116
]
117117
| NotGiven = NOT_GIVEN,
118-
sort: Optional[
119-
Literal[
120-
"created_at",
121-
"primary_eval_issue_score",
122-
"score_trustworthiness",
123-
"score_context_sufficiency",
124-
"score_response_helpfulness",
125-
"score_query_ease",
126-
"score_response_groundedness",
127-
]
128-
]
129-
| NotGiven = NOT_GIVEN,
118+
sort: Optional[str] | NotGiven = NOT_GIVEN,
130119
tool_call_names: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
131120
was_cache_hit: Optional[bool] | NotGiven = NOT_GIVEN,
132121
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -261,18 +250,7 @@ def list_by_group(
261250
]
262251
| NotGiven = NOT_GIVEN,
263252
remediation_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
264-
sort: Optional[
265-
Literal[
266-
"created_at",
267-
"primary_eval_issue_score",
268-
"score_trustworthiness",
269-
"score_context_sufficiency",
270-
"score_response_helpfulness",
271-
"score_query_ease",
272-
"score_response_groundedness",
273-
]
274-
]
275-
| NotGiven = NOT_GIVEN,
253+
sort: Optional[str] | NotGiven = NOT_GIVEN,
276254
tool_call_names: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
277255
was_cache_hit: Optional[bool] | NotGiven = NOT_GIVEN,
278256
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -561,18 +539,7 @@ def list(
561539
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "ungrounded"]]
562540
]
563541
| NotGiven = NOT_GIVEN,
564-
sort: Optional[
565-
Literal[
566-
"created_at",
567-
"primary_eval_issue_score",
568-
"score_trustworthiness",
569-
"score_context_sufficiency",
570-
"score_response_helpfulness",
571-
"score_query_ease",
572-
"score_response_groundedness",
573-
]
574-
]
575-
| NotGiven = NOT_GIVEN,
542+
sort: Optional[str] | NotGiven = NOT_GIVEN,
576543
tool_call_names: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
577544
was_cache_hit: Optional[bool] | NotGiven = NOT_GIVEN,
578545
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -709,18 +676,7 @@ async def list_by_group(
709676
]
710677
| NotGiven = NOT_GIVEN,
711678
remediation_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
712-
sort: Optional[
713-
Literal[
714-
"created_at",
715-
"primary_eval_issue_score",
716-
"score_trustworthiness",
717-
"score_context_sufficiency",
718-
"score_response_helpfulness",
719-
"score_query_ease",
720-
"score_response_groundedness",
721-
]
722-
]
723-
| NotGiven = NOT_GIVEN,
679+
sort: Optional[str] | NotGiven = NOT_GIVEN,
724680
tool_call_names: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
725681
was_cache_hit: Optional[bool] | NotGiven = NOT_GIVEN,
726682
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

src/codex/types/projects/query_log_list_by_group_params.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,7 @@ class QueryLogListByGroupParams(TypedDict, total=False):
5151
remediation_ids: SequenceNotStr[str]
5252
"""List of groups to list child logs for"""
5353

54-
sort: Optional[
55-
Literal[
56-
"created_at",
57-
"primary_eval_issue_score",
58-
"score_trustworthiness",
59-
"score_context_sufficiency",
60-
"score_response_helpfulness",
61-
"score_query_ease",
62-
"score_response_groundedness",
63-
]
64-
]
54+
sort: Optional[str]
6555

6656
tool_call_names: Optional[SequenceNotStr[str]]
6757
"""Filter by names of tools called in the assistant response"""

src/codex/types/projects/query_log_list_params.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,7 @@ class QueryLogListParams(TypedDict, total=False):
4545
]
4646
"""Filter logs that have ANY of these primary evaluation issues (OR operation)"""
4747

48-
sort: Optional[
49-
Literal[
50-
"created_at",
51-
"primary_eval_issue_score",
52-
"score_trustworthiness",
53-
"score_context_sufficiency",
54-
"score_response_helpfulness",
55-
"score_query_ease",
56-
"score_response_groundedness",
57-
]
58-
]
48+
sort: Optional[str]
5949

6050
tool_call_names: Optional[SequenceNotStr[str]]
6151
"""Filter by names of tools called in the assistant response"""

tests/api_resources/projects/test_query_logs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def test_method_list_with_all_params(self, client: Codex) -> None:
107107
order="asc",
108108
passed_evals=["string"],
109109
primary_eval_issue=["hallucination"],
110-
sort="created_at",
110+
sort="sort",
111111
tool_call_names=["string"],
112112
was_cache_hit=True,
113113
)
@@ -230,7 +230,7 @@ def test_method_list_by_group_with_all_params(self, client: Codex) -> None:
230230
passed_evals=["string"],
231231
primary_eval_issue=["hallucination"],
232232
remediation_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
233-
sort="created_at",
233+
sort="sort",
234234
tool_call_names=["string"],
235235
was_cache_hit=True,
236236
)
@@ -469,7 +469,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCodex) -> No
469469
order="asc",
470470
passed_evals=["string"],
471471
primary_eval_issue=["hallucination"],
472-
sort="created_at",
472+
sort="sort",
473473
tool_call_names=["string"],
474474
was_cache_hit=True,
475475
)
@@ -592,7 +592,7 @@ async def test_method_list_by_group_with_all_params(self, async_client: AsyncCod
592592
passed_evals=["string"],
593593
primary_eval_issue=["hallucination"],
594594
remediation_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
595-
sort="created_at",
595+
sort="sort",
596596
tool_call_names=["string"],
597597
was_cache_hit=True,
598598
)

0 commit comments

Comments
 (0)