Skip to content

Commit 7ccf252

Browse files
feat(api): api update
1 parent 1c03b05 commit 7ccf252

File tree

6 files changed

+110
-10
lines changed

6 files changed

+110
-10
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: 56
2-
openapi_spec_hash: 12260ab88069ff15d254606e041debfb
2+
openapi_spec_hash: 3edbb8139be919b07598ed85ebea9878
33
config_hash: 6c3ad84d97bf1d0989ad2ec0cae64078

src/codex/resources/projects/query_logs.py

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,17 @@ def list(
147147
148148
primary_eval_issue: Filter logs that have ANY of these primary evaluation issues (OR operation)
149149
150+
sort: Field or score to sort by.
151+
152+
Available fields: 'created_at', 'primary_eval_issue_score'.
153+
154+
For eval scores, use '.eval.' prefix followed by the eval name.
155+
156+
Default eval scores: '.eval.trustworthiness', '.eval.context_sufficiency',
157+
'.eval.response_helpfulness', '.eval.query_ease', '.eval.response_groundedness'.
158+
159+
Custom eval scores: '.eval.custom_eval_1', '.eval.custom_eval_2', etc.
160+
150161
tool_call_names: Filter by names of tools called in the assistant response
151162
152163
was_cache_hit: Filter by cache hit status
@@ -286,6 +297,17 @@ def list_by_group(
286297
287298
remediation_ids: List of groups to list child logs for
288299
300+
sort: Field or score to sort by.
301+
302+
Available fields: 'created_at', 'primary_eval_issue_score'.
303+
304+
For eval scores, use '.eval.' prefix followed by the eval name.
305+
306+
Default eval scores: '.eval.trustworthiness', '.eval.context_sufficiency',
307+
'.eval.response_helpfulness', '.eval.query_ease', '.eval.response_groundedness'.
308+
309+
Custom eval scores: '.eval.custom_eval_1', '.eval.custom_eval_2', etc.
310+
289311
tool_call_names: Filter by names of tools called in the assistant response
290312
291313
was_cache_hit: Filter by cache hit status
@@ -351,8 +373,7 @@ def list_groups(
351373
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "ungrounded"]]
352374
]
353375
| NotGiven = NOT_GIVEN,
354-
sort: Optional[Literal["created_at", "primary_eval_issue_score", "total_count", "custom_rank", "impact_score"]]
355-
| NotGiven = NOT_GIVEN,
376+
sort: Optional[str] | NotGiven = NOT_GIVEN,
356377
tool_call_names: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
357378
was_cache_hit: Optional[bool] | NotGiven = NOT_GIVEN,
358379
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -384,6 +405,18 @@ def list_groups(
384405
385406
primary_eval_issue: Filter logs that have ANY of these primary evaluation issues (OR operation)
386407
408+
sort: Field or score to sort by.
409+
410+
Available fields: 'created_at', 'custom_rank', 'impact_score',
411+
'primary_eval_issue_score', 'total_count'.
412+
413+
For eval scores, use '.eval.' prefix followed by the eval name.
414+
415+
Default eval scores: '.eval.trustworthiness', '.eval.context_sufficiency',
416+
'.eval.response_helpfulness', '.eval.query_ease', '.eval.response_groundedness'.
417+
418+
Custom eval scores: '.eval.custom_eval_1', '.eval.custom_eval_2', etc.
419+
387420
tool_call_names: Filter by names of tools called in the assistant response
388421
389422
was_cache_hit: Filter by cache hit status
@@ -609,6 +642,17 @@ def list(
609642
610643
primary_eval_issue: Filter logs that have ANY of these primary evaluation issues (OR operation)
611644
645+
sort: Field or score to sort by.
646+
647+
Available fields: 'created_at', 'primary_eval_issue_score'.
648+
649+
For eval scores, use '.eval.' prefix followed by the eval name.
650+
651+
Default eval scores: '.eval.trustworthiness', '.eval.context_sufficiency',
652+
'.eval.response_helpfulness', '.eval.query_ease', '.eval.response_groundedness'.
653+
654+
Custom eval scores: '.eval.custom_eval_1', '.eval.custom_eval_2', etc.
655+
612656
tool_call_names: Filter by names of tools called in the assistant response
613657
614658
was_cache_hit: Filter by cache hit status
@@ -750,6 +794,17 @@ async def list_by_group(
750794
751795
remediation_ids: List of groups to list child logs for
752796
797+
sort: Field or score to sort by.
798+
799+
Available fields: 'created_at', 'primary_eval_issue_score'.
800+
801+
For eval scores, use '.eval.' prefix followed by the eval name.
802+
803+
Default eval scores: '.eval.trustworthiness', '.eval.context_sufficiency',
804+
'.eval.response_helpfulness', '.eval.query_ease', '.eval.response_groundedness'.
805+
806+
Custom eval scores: '.eval.custom_eval_1', '.eval.custom_eval_2', etc.
807+
753808
tool_call_names: Filter by names of tools called in the assistant response
754809
755810
was_cache_hit: Filter by cache hit status
@@ -815,8 +870,7 @@ def list_groups(
815870
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "ungrounded"]]
816871
]
817872
| NotGiven = NOT_GIVEN,
818-
sort: Optional[Literal["created_at", "primary_eval_issue_score", "total_count", "custom_rank", "impact_score"]]
819-
| NotGiven = NOT_GIVEN,
873+
sort: Optional[str] | NotGiven = NOT_GIVEN,
820874
tool_call_names: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
821875
was_cache_hit: Optional[bool] | NotGiven = NOT_GIVEN,
822876
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -848,6 +902,18 @@ def list_groups(
848902
849903
primary_eval_issue: Filter logs that have ANY of these primary evaluation issues (OR operation)
850904
905+
sort: Field or score to sort by.
906+
907+
Available fields: 'created_at', 'custom_rank', 'impact_score',
908+
'primary_eval_issue_score', 'total_count'.
909+
910+
For eval scores, use '.eval.' prefix followed by the eval name.
911+
912+
Default eval scores: '.eval.trustworthiness', '.eval.context_sufficiency',
913+
'.eval.response_helpfulness', '.eval.query_ease', '.eval.response_groundedness'.
914+
915+
Custom eval scores: '.eval.custom_eval_1', '.eval.custom_eval_2', etc.
916+
851917
tool_call_names: Filter by names of tools called in the assistant response
852918
853919
was_cache_hit: Filter by cache hit status

src/codex/types/projects/query_log_list_by_group_params.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@ class QueryLogListByGroupParams(TypedDict, total=False):
5252
"""List of groups to list child logs for"""
5353

5454
sort: Optional[str]
55+
"""Field or score to sort by.
56+
57+
Available fields: 'created_at', 'primary_eval_issue_score'.
58+
59+
For eval scores, use '.eval.' prefix followed by the eval name.
60+
61+
Default eval scores: '.eval.trustworthiness', '.eval.context_sufficiency',
62+
'.eval.response_helpfulness', '.eval.query_ease', '.eval.response_groundedness'.
63+
64+
Custom eval scores: '.eval.custom_eval_1', '.eval.custom_eval_2', etc.
65+
"""
5566

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

src/codex/types/projects/query_log_list_groups_params.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,19 @@ class QueryLogListGroupsParams(TypedDict, total=False):
4848
]
4949
"""Filter logs that have ANY of these primary evaluation issues (OR operation)"""
5050

51-
sort: Optional[Literal["created_at", "primary_eval_issue_score", "total_count", "custom_rank", "impact_score"]]
51+
sort: Optional[str]
52+
"""Field or score to sort by.
53+
54+
Available fields: 'created_at', 'custom_rank', 'impact_score',
55+
'primary_eval_issue_score', 'total_count'.
56+
57+
For eval scores, use '.eval.' prefix followed by the eval name.
58+
59+
Default eval scores: '.eval.trustworthiness', '.eval.context_sufficiency',
60+
'.eval.response_helpfulness', '.eval.query_ease', '.eval.response_groundedness'.
61+
62+
Custom eval scores: '.eval.custom_eval_1', '.eval.custom_eval_2', etc.
63+
"""
5264

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

src/codex/types/projects/query_log_list_params.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ class QueryLogListParams(TypedDict, total=False):
4646
"""Filter logs that have ANY of these primary evaluation issues (OR operation)"""
4747

4848
sort: Optional[str]
49+
"""Field or score to sort by.
50+
51+
Available fields: 'created_at', 'primary_eval_issue_score'.
52+
53+
For eval scores, use '.eval.' prefix followed by the eval name.
54+
55+
Default eval scores: '.eval.trustworthiness', '.eval.context_sufficiency',
56+
'.eval.response_helpfulness', '.eval.query_ease', '.eval.response_groundedness'.
57+
58+
Custom eval scores: '.eval.custom_eval_1', '.eval.custom_eval_2', etc.
59+
"""
4960

5061
tool_call_names: Optional[SequenceNotStr[str]]
5162
"""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
@@ -108,7 +108,7 @@ def test_method_list_with_all_params(self, client: Codex) -> None:
108108
order="asc",
109109
passed_evals=["string"],
110110
primary_eval_issue=["hallucination"],
111-
sort="sort",
111+
sort="created_at",
112112
tool_call_names=["string"],
113113
was_cache_hit=True,
114114
)
@@ -231,7 +231,7 @@ def test_method_list_by_group_with_all_params(self, client: Codex) -> None:
231231
passed_evals=["string"],
232232
primary_eval_issue=["hallucination"],
233233
remediation_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
234-
sort="sort",
234+
sort="created_at",
235235
tool_call_names=["string"],
236236
was_cache_hit=True,
237237
)
@@ -527,7 +527,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCodex) -> No
527527
order="asc",
528528
passed_evals=["string"],
529529
primary_eval_issue=["hallucination"],
530-
sort="sort",
530+
sort="created_at",
531531
tool_call_names=["string"],
532532
was_cache_hit=True,
533533
)
@@ -650,7 +650,7 @@ async def test_method_list_by_group_with_all_params(self, async_client: AsyncCod
650650
passed_evals=["string"],
651651
primary_eval_issue=["hallucination"],
652652
remediation_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
653-
sort="sort",
653+
sort="created_at",
654654
tool_call_names=["string"],
655655
was_cache_hit=True,
656656
)

0 commit comments

Comments
 (0)