@zuplo/runtime 6.59.49 → 6.59.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/esm/index.js +45 -45
- package/out/esm/index.js.map +1 -1
- package/out/types/index.d.ts +30 -0
- package/package.json +1 -1
package/out/types/index.d.ts
CHANGED
|
@@ -190,6 +190,36 @@ export declare interface AIGatewayMeteringInboundPolicyOptions {
|
|
|
190
190
|
throwOnFailure?: boolean;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
+
/**
|
|
194
|
+
* AI Gateway Semantic Cache policy for caching chat completion responses
|
|
195
|
+
* based on semantic similarity of user messages.
|
|
196
|
+
*
|
|
197
|
+
* This policy wraps the SemanticCacheInboundPolicy and applies it specifically
|
|
198
|
+
* for AI Gateway chat completion endpoints. It uses configuration from the
|
|
199
|
+
* user's metadata to determine whether caching should be applied and with
|
|
200
|
+
* what tolerance.
|
|
201
|
+
*
|
|
202
|
+
* @title AI Gateway Semantic Cache
|
|
203
|
+
* @hidden
|
|
204
|
+
* @param request - The ZuploRequest
|
|
205
|
+
* @param context - The ZuploContext
|
|
206
|
+
* @param options - The policy options set in policies.json
|
|
207
|
+
* @param policyName - The name of the policy as set in policies.json
|
|
208
|
+
* @returns A Request or a Response
|
|
209
|
+
*/
|
|
210
|
+
export declare function AIGatewaySemanticCacheInboundPolicy(
|
|
211
|
+
request: ZuploRequest,
|
|
212
|
+
context: ZuploContext,
|
|
213
|
+
options: AIGatewaySemanticCacheInboundPolicyOptions,
|
|
214
|
+
policyName: string
|
|
215
|
+
): Promise<Response | ZuploRequest<RequestGeneric_2>>;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Options for the AI Gateway Semantic Cache policy.
|
|
219
|
+
* @public
|
|
220
|
+
*/
|
|
221
|
+
export declare interface AIGatewaySemanticCacheInboundPolicyOptions {}
|
|
222
|
+
|
|
193
223
|
/**
|
|
194
224
|
* The options for this policy.
|
|
195
225
|
* @public
|