@@ -488,18 +488,17 @@ def validate(
488488 project_id : str ,
489489 * ,
490490 context : str ,
491+ prompt : str ,
491492 query : str ,
492- response : project_validate_params . Response ,
493+ response : str ,
493494 use_llm_matching : bool | NotGiven = NOT_GIVEN ,
494495 constrain_outputs : Optional [List [str ]] | NotGiven = NOT_GIVEN ,
495496 custom_eval_thresholds : Optional [Dict [str , float ]] | NotGiven = NOT_GIVEN ,
496497 custom_metadata : Optional [object ] | NotGiven = NOT_GIVEN ,
497498 eval_scores : Optional [Dict [str , float ]] | NotGiven = NOT_GIVEN ,
498- messages : Iterable [project_validate_params .Message ] | NotGiven = NOT_GIVEN ,
499+ messages : Optional [ Iterable [project_validate_params .Message ] ] | NotGiven = NOT_GIVEN ,
499500 options : Optional [project_validate_params .Options ] | NotGiven = NOT_GIVEN ,
500- prompt : Optional [str ] | NotGiven = NOT_GIVEN ,
501501 quality_preset : Literal ["best" , "high" , "medium" , "low" , "base" ] | NotGiven = NOT_GIVEN ,
502- rewritten_question : Optional [str ] | NotGiven = NOT_GIVEN ,
503502 task : Optional [str ] | NotGiven = NOT_GIVEN ,
504503 x_client_library_version : str | NotGiven = NOT_GIVEN ,
505504 x_integration_type : str | NotGiven = NOT_GIVEN ,
@@ -527,8 +526,9 @@ def validate(
527526 eval_scores: Scores assessing different aspects of the RAG system. If not provided, TLM will
528527 be used to generate scores.
529528
530- messages: Message history to provide conversation context for the query. Messages contain
531- up to and including the latest user prompt to the LLM.
529+ messages: Optional message history to provide conversation context for the query. Used to
530+ rewrite query into a self-contained version of itself. If not provided, the
531+ query will be treated as self-contained.
532532
533533 options: Typed dict of advanced configuration options for the Trustworthy Language Model.
534534 Many of these configurations are determined by the quality preset selected
@@ -615,14 +615,8 @@ def validate(
615615 - name: Name of the evaluation criteria.
616616 - criteria: Instructions specifying the evaluation criteria.
617617
618- prompt: The prompt to use for the TLM call. If not provided, the prompt will be
619- generated from the messages.
620-
621618 quality_preset: The quality preset to use for the TLM or Trustworthy RAG API.
622619
623- rewritten_question: The re-written query if it was provided by the client to Codex from a user to be
624- used instead of the original query.
625-
626620 extra_headers: Send extra headers
627621
628622 extra_query: Add additional query parameters to the request
@@ -649,6 +643,7 @@ def validate(
649643 body = maybe_transform (
650644 {
651645 "context" : context ,
646+ "prompt" : prompt ,
652647 "query" : query ,
653648 "response" : response ,
654649 "constrain_outputs" : constrain_outputs ,
@@ -657,9 +652,7 @@ def validate(
657652 "eval_scores" : eval_scores ,
658653 "messages" : messages ,
659654 "options" : options ,
660- "prompt" : prompt ,
661655 "quality_preset" : quality_preset ,
662- "rewritten_question" : rewritten_question ,
663656 "task" : task ,
664657 },
665658 project_validate_params .ProjectValidateParams ,
@@ -1097,18 +1090,17 @@ async def validate(
10971090 project_id : str ,
10981091 * ,
10991092 context : str ,
1093+ prompt : str ,
11001094 query : str ,
1101- response : project_validate_params . Response ,
1095+ response : str ,
11021096 use_llm_matching : bool | NotGiven = NOT_GIVEN ,
11031097 constrain_outputs : Optional [List [str ]] | NotGiven = NOT_GIVEN ,
11041098 custom_eval_thresholds : Optional [Dict [str , float ]] | NotGiven = NOT_GIVEN ,
11051099 custom_metadata : Optional [object ] | NotGiven = NOT_GIVEN ,
11061100 eval_scores : Optional [Dict [str , float ]] | NotGiven = NOT_GIVEN ,
1107- messages : Iterable [project_validate_params .Message ] | NotGiven = NOT_GIVEN ,
1101+ messages : Optional [ Iterable [project_validate_params .Message ] ] | NotGiven = NOT_GIVEN ,
11081102 options : Optional [project_validate_params .Options ] | NotGiven = NOT_GIVEN ,
1109- prompt : Optional [str ] | NotGiven = NOT_GIVEN ,
11101103 quality_preset : Literal ["best" , "high" , "medium" , "low" , "base" ] | NotGiven = NOT_GIVEN ,
1111- rewritten_question : Optional [str ] | NotGiven = NOT_GIVEN ,
11121104 task : Optional [str ] | NotGiven = NOT_GIVEN ,
11131105 x_client_library_version : str | NotGiven = NOT_GIVEN ,
11141106 x_integration_type : str | NotGiven = NOT_GIVEN ,
@@ -1136,8 +1128,9 @@ async def validate(
11361128 eval_scores: Scores assessing different aspects of the RAG system. If not provided, TLM will
11371129 be used to generate scores.
11381130
1139- messages: Message history to provide conversation context for the query. Messages contain
1140- up to and including the latest user prompt to the LLM.
1131+ messages: Optional message history to provide conversation context for the query. Used to
1132+ rewrite query into a self-contained version of itself. If not provided, the
1133+ query will be treated as self-contained.
11411134
11421135 options: Typed dict of advanced configuration options for the Trustworthy Language Model.
11431136 Many of these configurations are determined by the quality preset selected
@@ -1224,14 +1217,8 @@ async def validate(
12241217 - name: Name of the evaluation criteria.
12251218 - criteria: Instructions specifying the evaluation criteria.
12261219
1227- prompt: The prompt to use for the TLM call. If not provided, the prompt will be
1228- generated from the messages.
1229-
12301220 quality_preset: The quality preset to use for the TLM or Trustworthy RAG API.
12311221
1232- rewritten_question: The re-written query if it was provided by the client to Codex from a user to be
1233- used instead of the original query.
1234-
12351222 extra_headers: Send extra headers
12361223
12371224 extra_query: Add additional query parameters to the request
@@ -1258,6 +1245,7 @@ async def validate(
12581245 body = await async_maybe_transform (
12591246 {
12601247 "context" : context ,
1248+ "prompt" : prompt ,
12611249 "query" : query ,
12621250 "response" : response ,
12631251 "constrain_outputs" : constrain_outputs ,
@@ -1266,9 +1254,7 @@ async def validate(
12661254 "eval_scores" : eval_scores ,
12671255 "messages" : messages ,
12681256 "options" : options ,
1269- "prompt" : prompt ,
12701257 "quality_preset" : quality_preset ,
1271- "rewritten_question" : rewritten_question ,
12721258 "task" : task ,
12731259 },
12741260 project_validate_params .ProjectValidateParams ,
0 commit comments