Skip to content

Commit 75b1e81

Browse files
feat(api): api update
1 parent ab93d9d commit 75b1e81

13 files changed

+85
-14
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: 06bae836118b9c7ac2cf1b5e1a576296
2+
openapi_spec_hash: f17890d85522687a4c68702da9ad2efb
33
config_hash: 14b2643a0ec60cf326dfed00939644ff

requirements-dev.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ httpx==0.28.1
5656
# via codex-sdk
5757
# via httpx-aiohttp
5858
# via respx
59-
httpx-aiohttp==0.1.6
59+
httpx-aiohttp==0.1.8
6060
# via codex-sdk
6161
idna==3.4
6262
# via anyio

requirements.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ httpcore==1.0.2
4343
httpx==0.28.1
4444
# via codex-sdk
4545
# via httpx-aiohttp
46-
httpx-aiohttp==0.1.6
46+
httpx-aiohttp==0.1.8
4747
# via codex-sdk
4848
idna==3.4
4949
# via anyio

src/codex/resources/projects/query_logs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def list(
9999
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
100100
passed_evals: Optional[List[str]] | NotGiven = NOT_GIVEN,
101101
primary_eval_issue: Optional[
102-
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "unsupported"]]
102+
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "ungrounded"]]
103103
]
104104
| NotGiven = NOT_GIVEN,
105105
sort: Optional[Literal["created_at", "primary_eval_issue_score"]] | NotGiven = NOT_GIVEN,
@@ -184,7 +184,7 @@ def list_by_group(
184184
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
185185
passed_evals: Optional[List[str]] | NotGiven = NOT_GIVEN,
186186
primary_eval_issue: Optional[
187-
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "unsupported"]]
187+
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "ungrounded"]]
188188
]
189189
| NotGiven = NOT_GIVEN,
190190
remediation_ids: List[str] | NotGiven = NOT_GIVEN,
@@ -276,7 +276,7 @@ def list_groups(
276276
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
277277
passed_evals: Optional[List[str]] | NotGiven = NOT_GIVEN,
278278
primary_eval_issue: Optional[
279-
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "unsupported"]]
279+
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "ungrounded"]]
280280
]
281281
| NotGiven = NOT_GIVEN,
282282
sort: Optional[Literal["created_at", "primary_eval_issue_score", "total_count", "custom_rank"]]
@@ -457,7 +457,7 @@ async def list(
457457
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
458458
passed_evals: Optional[List[str]] | NotGiven = NOT_GIVEN,
459459
primary_eval_issue: Optional[
460-
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "unsupported"]]
460+
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "ungrounded"]]
461461
]
462462
| NotGiven = NOT_GIVEN,
463463
sort: Optional[Literal["created_at", "primary_eval_issue_score"]] | NotGiven = NOT_GIVEN,
@@ -542,7 +542,7 @@ async def list_by_group(
542542
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
543543
passed_evals: Optional[List[str]] | NotGiven = NOT_GIVEN,
544544
primary_eval_issue: Optional[
545-
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "unsupported"]]
545+
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "ungrounded"]]
546546
]
547547
| NotGiven = NOT_GIVEN,
548548
remediation_ids: List[str] | NotGiven = NOT_GIVEN,
@@ -634,7 +634,7 @@ async def list_groups(
634634
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
635635
passed_evals: Optional[List[str]] | NotGiven = NOT_GIVEN,
636636
primary_eval_issue: Optional[
637-
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "unsupported"]]
637+
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "ungrounded"]]
638638
]
639639
| NotGiven = NOT_GIVEN,
640640
sort: Optional[Literal["created_at", "primary_eval_issue_score", "total_count", "custom_rank"]]

src/codex/types/project_validate_response.py

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

3-
from typing import Dict, Optional
3+
from typing import Dict, List, Optional
44

55
from .._models import BaseModel
66

7-
__all__ = ["ProjectValidateResponse", "EvalScores"]
7+
__all__ = ["ProjectValidateResponse", "DeterministicGuardrailsResults", "EvalScores"]
8+
9+
10+
class DeterministicGuardrailsResults(BaseModel):
11+
guardrail_name: str
12+
13+
should_guardrail: bool
14+
15+
matches: Optional[List[str]] = None
816

917

1018
class EvalScores(BaseModel):
@@ -22,6 +30,9 @@ class EvalScores(BaseModel):
2230

2331

2432
class ProjectValidateResponse(BaseModel):
33+
deterministic_guardrails_results: Optional[Dict[str, DeterministicGuardrailsResults]] = None
34+
"""Results from deterministic guardrails applied to the response."""
35+
2536
escalated_to_sme: bool
2637
"""
2738
True if the question should be escalated to Codex for an SME to review, False

src/codex/types/projects/query_log_list_by_group_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class QueryLogListByGroupParams(TypedDict, total=False):
4040
"""Filter by evals that passed"""
4141

4242
primary_eval_issue: Optional[
43-
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "unsupported"]]
43+
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "ungrounded"]]
4444
]
4545
"""Filter logs that have ANY of these primary evaluation issues (OR operation)"""
4646

src/codex/types/projects/query_log_list_by_group_response.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"QueryLogsByGroupQueryLogFormattedGuardrailEvalScores",
1616
"QueryLogsByGroupQueryLogFormattedNonGuardrailEvalScores",
1717
"QueryLogsByGroupQueryLogContext",
18+
"QueryLogsByGroupQueryLogDeterministicGuardrailsResults",
1819
]
1920

2021

@@ -59,6 +60,14 @@ class QueryLogsByGroupQueryLogContext(BaseModel):
5960
"""Title or heading of the document. Useful for display and context."""
6061

6162

63+
class QueryLogsByGroupQueryLogDeterministicGuardrailsResults(BaseModel):
64+
guardrail_name: str
65+
66+
should_guardrail: bool
67+
68+
matches: Optional[List[str]] = None
69+
70+
6271
class QueryLogsByGroupQueryLog(BaseModel):
6372
id: str
6473

@@ -104,6 +113,9 @@ class QueryLogsByGroupQueryLog(BaseModel):
104113
custom_metadata_keys: Optional[List[str]] = None
105114
"""Keys of the custom metadata"""
106115

116+
deterministic_guardrails_results: Optional[Dict[str, QueryLogsByGroupQueryLogDeterministicGuardrailsResults]] = None
117+
"""Results of deterministic guardrails applied to the query"""
118+
107119
escalated: Optional[bool] = None
108120
"""If true, the question was escalated to Codex for an SME to review"""
109121

src/codex/types/projects/query_log_list_groups_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class QueryLogListGroupsParams(TypedDict, total=False):
4040
"""Filter by evals that passed"""
4141

4242
primary_eval_issue: Optional[
43-
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "unsupported"]]
43+
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "ungrounded"]]
4444
]
4545
"""Filter logs that have ANY of these primary evaluation issues (OR operation)"""
4646

src/codex/types/projects/query_log_list_groups_response.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"QueryLogGroupFormattedGuardrailEvalScores",
1515
"QueryLogGroupFormattedNonGuardrailEvalScores",
1616
"QueryLogGroupContext",
17+
"QueryLogGroupDeterministicGuardrailsResults",
1718
]
1819

1920

@@ -58,6 +59,14 @@ class QueryLogGroupContext(BaseModel):
5859
"""Title or heading of the document. Useful for display and context."""
5960

6061

62+
class QueryLogGroupDeterministicGuardrailsResults(BaseModel):
63+
guardrail_name: str
64+
65+
should_guardrail: bool
66+
67+
matches: Optional[List[str]] = None
68+
69+
6170
class QueryLogGroup(BaseModel):
6271
id: str
6372

@@ -103,6 +112,9 @@ class QueryLogGroup(BaseModel):
103112
custom_metadata_keys: Optional[List[str]] = None
104113
"""Keys of the custom metadata"""
105114

115+
deterministic_guardrails_results: Optional[Dict[str, QueryLogGroupDeterministicGuardrailsResults]] = None
116+
"""Results of deterministic guardrails applied to the query"""
117+
106118
escalated: Optional[bool] = None
107119
"""If true, the question was escalated to Codex for an SME to review"""
108120

src/codex/types/projects/query_log_list_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class QueryLogListParams(TypedDict, total=False):
3737
"""Filter by evals that passed"""
3838

3939
primary_eval_issue: Optional[
40-
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "unsupported"]]
40+
List[Literal["hallucination", "search_failure", "unhelpful", "difficult_query", "ungrounded"]]
4141
]
4242
"""Filter logs that have ANY of these primary evaluation issues (OR operation)"""
4343

0 commit comments

Comments
 (0)