Skip to content

Commit

Permalink
Merge pull request #12606 from AnuGayan/master-AI-API-temp
Browse files Browse the repository at this point in the history
Fix issues in AI Subscription throttling policy deployment
  • Loading branch information
AnuGayan authored Sep 27, 2024
2 parents c72f127 + ab0107f commit 499d3ae
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,21 @@
ifThenElse((sum(cast(map:get(propertiesMap,'COMPLETION_TOKENS'),'long')) >= $quotaPolicy.getAiApiQuota().getCompletionTokenCount()L), true,
#end
#if($quotaPolicy.getAiApiQuota().getTotalTokenCount() != 0)
ifThenElse((sum(cast(map:get(propertiesMap,'TOTAL_TOKENS'),'long')) >= $quotaPolicy.getAiApiQuota().getTotalTokenCount()L), true, false)
ifThenElse((sum(cast(map:get(propertiesMap,'TOTAL_TOKENS'),'long')) >= $quotaPolicy.getAiApiQuota().getTotalTokenCount()L), true,
#end
#if($quotaPolicy.getLimit().getPromptTokenCount() != 0)
false)
#if($quotaPolicy.getAiApiQuota().getPromptTokenCount() != 0)
)
#end
#if($quotaPolicy.getLimit().getCompletionTokenCount() != 0)
#if($quotaPolicy.getAiApiQuota().getCompletionTokenCount() != 0)
)
#end
#if($quotaPolicy.getRequestCountLimit().getRequestCount() != 0)
)
#end
#if($quotaPolicy.getAiApiQuota().getTotalTokenCount() != 0)
)
#end
as isThrottled, expiryTimeStamp
group by throttleKey
INSERT ALL EVENTS into ResultStream;
Expand Down

0 comments on commit 499d3ae

Please sign in to comment.