You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Operations for creating, searching, and deleting cache entries
11
+
description: Operations for creating, searching, and deleting cache entries.
12
12
servers:
13
13
- url: http://localhost:8080
14
14
description: Generated server URL
@@ -18,6 +18,7 @@ paths:
18
18
tags:
19
19
- Cache Entries
20
20
summary: Search the cache
21
+
description: Searches the cache for entries that match the prompt and attributes. If no entries are found, this endpoint returns an empty array.
21
22
operationId: search
22
23
parameters:
23
24
- $ref: '#/components/parameters/cacheId'
@@ -68,7 +69,8 @@ paths:
68
69
post:
69
70
tags:
70
71
- Cache Entries
71
-
summary: Add a new cache entry to the cache
72
+
summary: Add a new entry to the cache
73
+
description: Adds an entry to the cache with a prompt and response.
72
74
operationId: set
73
75
parameters:
74
76
- $ref: '#/components/parameters/cacheId'
@@ -118,7 +120,8 @@ paths:
118
120
delete:
119
121
tags:
120
122
- Cache Entries
121
-
summary: Delete cache entries based on the request parameters
123
+
summary: Delete multiple cache entries
124
+
description: Deletes multiple cache entries based on specified attributes. If no attributes are provided, all entries in the cache are deleted.
122
125
operationId: deleteQuery
123
126
parameters:
124
127
- $ref: '#/components/parameters/cacheId'
@@ -169,7 +172,8 @@ paths:
169
172
delete:
170
173
tags:
171
174
- Cache Entries
172
-
summary: Delete a cache entry by ID
175
+
summary: Delete a single cache entry
176
+
description: Deletes a single cache entry by the entry ID.
173
177
operationId: delete
174
178
parameters:
175
179
- $ref: '#/components/parameters/cacheId'
@@ -218,14 +222,14 @@ components:
218
222
cacheId:
219
223
name: cacheId
220
224
in: path
221
-
description: The ID of the cache
225
+
description: The cache ID.
222
226
required: true
223
227
schema:
224
228
type: string
225
229
entryId:
226
230
name: entryId
227
231
in: path
228
-
description: The ID of the cache entry to delete
232
+
description: The ID of the cache entry to delete.
229
233
required: true
230
234
schema:
231
235
type: string
@@ -237,20 +241,20 @@ components:
237
241
properties:
238
242
prompt:
239
243
type: string
240
-
description: The prompt to search in the cache
244
+
description: The prompt to search for in the cache.
241
245
example: How does semantic caching work?
242
246
similarityThreshold:
243
247
minimum: 0
244
248
maximum: 1
245
249
type: number
246
-
description: The minimum similarity threshold for the cache entry (normalized cosine similarity)
250
+
description: The minimum similarity threshold for the cache entry (normalized cosine similarity).
247
251
format: float
248
252
example: 0.9
249
253
attributes:
250
254
type: object
251
255
additionalProperties:
252
256
type: string
253
-
description: Key-value pairs of attributes based on which to filter the cache entries. If multiple attributes are provided, only entries matching all attributes can be returned.
257
+
description: Key-value pairs of attributes that filter the cache entries. If provided, this endpoint only returns entries that contain all given attributes.
254
258
example:
255
259
language: en
256
260
topic: ai
@@ -264,7 +268,7 @@ components:
264
268
type: array
265
269
items:
266
270
$ref: '#/components/schemas/CacheEntry'
267
-
description: Array of cache entries matching the search criteria
271
+
description: Array of cache entries matching the search criteria. This array is empty if no entries match the search criteria.
268
272
description: Response representing the result of a successful cache entries search operation
269
273
CacheEntry:
270
274
required:
@@ -277,27 +281,27 @@ components:
277
281
properties:
278
282
id:
279
283
type: string
280
-
description: Unique identifier for the cache entry
284
+
description: Unique identifier for the cache entry.
description: The prompt associated with the cache entry
288
+
description: The prompt associated with the cache entry.
285
289
example: Tell me how semantic caching works
286
290
response:
287
291
type: string
288
-
description: The response associated with the cache entry
292
+
description: The response associated with the cache entry.
289
293
example: Semantic caching stores and retrieves data based on meaning, not exact matches.
290
294
attributes:
291
295
type: object
292
296
additionalProperties:
293
297
type: string
294
-
description: The key-value pairs of attributes that are associated with the cache entry
298
+
description: The key-value pairs of attributes that are associated with the cache entry.
295
299
example:
296
300
language: en
297
301
topic: ai
298
302
similarity:
299
303
type: number
300
-
description: The similarity metric used for similarity comparison
304
+
description: The similarity metric used for similarity comparison.
301
305
format: float
302
306
example: 0.95
303
307
description: A cache entry
@@ -310,22 +314,22 @@ components:
310
314
prompt:
311
315
example: How does semantic caching work?
312
316
type: string
313
-
description: The entry's prompt
317
+
description: The prompt for the entry.
314
318
response:
315
319
example: Semantic caching stores and retrieves data based on meaning, not exact matches.
316
320
type: string
317
-
description: The entry's response
321
+
description: The response to the prompt for the entry.
318
322
attributes:
319
323
type: object
320
324
additionalProperties:
321
325
type: string
322
-
description: Key-value pairs of attributes to be associated with the entry, can be used for filtering when searching for entries. All attribute names that can be associated with an entry must be initially defined during the cache creation.
326
+
description: Key-value pairs of attributes to be associated with the entry. These can be used for filtering when searching for entries. All attribute names that can be associated with an entry must be defined during cache creation.
323
327
example:
324
328
language: en
325
329
topic: ai
326
330
ttlMillis:
327
331
type: integer
328
-
description: The entry's time-to-live, in milliseconds
332
+
description: The entry's time-to-live, in milliseconds.
329
333
format: int64
330
334
description: Request to add a cache entry to the cache
331
335
SetEntryResponse:
@@ -335,7 +339,7 @@ components:
335
339
properties:
336
340
entryId:
337
341
type: string
338
-
description: The ID of the entry that was added to the cache
342
+
description: The ID of the entry that was added to the cache.
339
343
description: Response representing a successful cache entry addition
340
344
DeleteEntriesRequest:
341
345
required:
@@ -346,7 +350,7 @@ components:
346
350
type: object
347
351
additionalProperties:
348
352
type: string
349
-
description: Key-value pairs of attributes based on which to delete cache entries. If multiple attributes are provided, only entries matching all attributes will be deleted.
353
+
description: Key-value pairs of attributes associated with the cache entries to delete. If provided, this endpoint only deletes entries that contain all given attributes. If not provided, this endpoint deletes all entries in the cache.
350
354
example:
351
355
language: en
352
356
topic: ai
@@ -358,7 +362,7 @@ components:
358
362
properties:
359
363
deletedEntriesCount:
360
364
type: integer
361
-
description: The number of cache entries successfully deleted
365
+
description: The number of cache entries successfully deleted.
362
366
format: int64
363
367
example: 42
364
368
description: Response indicating the result of a cache entries deletion operation
@@ -367,15 +371,15 @@ components:
367
371
properties:
368
372
title:
369
373
type: string
370
-
description: A short, human-readable summary of the problem type
374
+
description: A shortsummary of the problem type.
371
375
example: Invalid Request
372
376
status:
373
377
type: integer
374
378
default: 400
375
-
description: The HTTP status code generated by the origin server for this occurrence of the problem
379
+
description: The HTTP status code generated by the origin server.
376
380
detail:
377
381
type: string
378
-
description: A human-readable explanation specific to this occurrence of the problem
382
+
description: An explanation specific to this problem.
379
383
type:
380
384
$ref: '#/components/schemas/BadRequestErrorUri'
381
385
required:
@@ -391,14 +395,14 @@ components:
391
395
properties:
392
396
title:
393
397
type: string
394
-
description: A short, human-readable summary of the problem type
398
+
description: A shortsummary of the problem type.
395
399
status:
396
400
type: integer
397
401
default: 401
398
-
description: The HTTP status code generated by the origin server for this occurrence of the problem
402
+
description: The HTTP status code generated by the origin server.
399
403
detail:
400
404
type: string
401
-
description: A human-readable explanation specific to this occurrence of the problem
405
+
description: An explanation specific to this problem.
0 commit comments