File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,6 +219,8 @@ paths:
219219
220220 /scenario-iteration-rules :
221221 $ref : ./marblecore-api/scenario-iteration-rules.yml#/~1scenario-iteration-rules
222+ /scenario-iteration-rules/ai-description :
223+ $ref : ./marblecore-api/scenario-iteration-rules.yml#/~1scenario-iteration-rules~1ai-description
222224 /scenario-iteration-rules/{ruleId} :
223225 $ref : ./marblecore-api/scenario-iteration-rules.yml#/~1scenario-iteration-rules~1{ruleId}
224226 /scenario-iteration-rules/{ruleId}/ai-description :
Original file line number Diff line number Diff line change 6363 $ref : ' components.yml#/responses/403'
6464 ' 404 ' :
6565 $ref : ' components.yml#/responses/404'
66+ /scenario-iteration-rules/ai-description :
67+ post :
68+ tags :
69+ - Scenario Iteration Rules
70+ summary : Generate AI description for an AST expression
71+ operationId : GenerateAiDescriptionForAstExpression
72+ security :
73+ - bearerAuth : []
74+ requestBody :
75+ description : ' AST expression to generate AI description for'
76+ required : true
77+ content :
78+ application/json :
79+ schema :
80+ type : object
81+ required :
82+ ast_expression
83+ properties :
84+ ast_expression :
85+ $ref : ' ast.yml#/components/schemas/NodeDto'
86+ responses :
87+ ' 200 ' :
88+ description : The created scenario iteration rule AI description
89+ content :
90+ application/json :
91+ schema :
92+ $ref : ' #/components/schemas/ScenarioIterationRuleAiDescriptionDto'
6693/scenario-iteration-rules/{ruleId} :
6794 get :
6895 tags :
Original file line number Diff line number Diff line change @@ -952,6 +952,10 @@ export type OpenSanctionsDatasetFreshnessDto = {
952952 version : string ;
953953 up_to_date : boolean ;
954954} ;
955+ export type ScenarioIterationRuleAiDescriptionDto = {
956+ /** The AI description for the scenario iteration rule */
957+ description : string ;
958+ } ;
955959export type UpdateScenarioIterationRuleBodyDto = {
956960 display_order ?: number ;
957961 name ?: string ;
@@ -960,10 +964,6 @@ export type UpdateScenarioIterationRuleBodyDto = {
960964 formula_ast_expression ?: ( NodeDto ) | null ;
961965 score_modifier ?: number ;
962966} ;
963- export type ScenarioIterationRuleAiDescriptionDto = {
964- /** The AI description for the scenario iteration rule */
965- description : string ;
966- } ;
967967export type PublicationAction = "publish" | "unpublish" ;
968968export type ScenarioPublication = {
969969 id : string ;
@@ -3232,6 +3232,21 @@ export function createScenarioIterationRule(createScenarioIterationRuleBodyDto:
32323232 body : createScenarioIterationRuleBodyDto
32333233 } ) ) ) ;
32343234}
3235+ /**
3236+ * Generate AI description for an AST expression
3237+ */
3238+ export function generateAiDescriptionForAstExpression ( body : {
3239+ ast_expression : NodeDto ;
3240+ } , opts ?: Oazapfts . RequestOpts ) {
3241+ return oazapfts . ok ( oazapfts . fetchJson < {
3242+ status : 200 ;
3243+ data : ScenarioIterationRuleAiDescriptionDto ;
3244+ } > ( "/scenario-iteration-rules/ai-description" , oazapfts . json ( {
3245+ ...opts ,
3246+ method : "POST" ,
3247+ body
3248+ } ) ) ) ;
3249+ }
32353250/**
32363251 * Get a scenario iteration rule by id
32373252 */
You can’t perform that action at this time.
0 commit comments