Skip to content

Commit bbdd425

Browse files
authored
Merge pull request #52 from Eigen-DB/feature/multiple-indexes
Now supporting the creation of multiple indexes!
2 parents a7570a7 + e98289f commit bbdd425

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1662
-1229
lines changed

apps/docs/api-reference/openapi.yaml renamed to apps/docs/api-reference/specs/embeddings.yaml

Lines changed: 40 additions & 234 deletions
Original file line numberDiff line numberDiff line change
@@ -57,70 +57,18 @@ components:
5757
- status
5858
- message
5959
paths:
60-
/health:
61-
get:
62-
summary: Database health check
63-
operationId: healthCheck
64-
description: Perform a health check on the database.
65-
security: []
66-
responses:
67-
'200':
68-
description: Database is healthy.
69-
content:
70-
application/json:
71-
schema:
72-
$ref: '#/components/schemas/responseSchema'
73-
example:
74-
status: 200
75-
message: healthy
76-
data:
77-
cpu_usage_percent: 0.06
78-
mem_usage_percent: 1.31
79-
uptime: 72h3m0.5s
80-
'500':
81-
description: Database is unhealthy.
82-
content:
83-
application/json:
84-
schema:
85-
$ref: '#/components/schemas/responseSchema'
86-
example:
87-
status: 500
88-
message: unhealthy
89-
error:
90-
code: ERROR_GETTING_CPU_USAGE
91-
description: detailed description of the error...
92-
/test-auth:
93-
get:
94-
summary: Test your authentication
95-
operationId: testAuth
96-
description: Test your authentication using your API key.
97-
responses:
98-
'200':
99-
description: Authenticated.
100-
content:
101-
application/json:
102-
schema:
103-
$ref: '#/components/schemas/responseSchema'
104-
example:
105-
status: 200
106-
message: Authenticated.
107-
'401':
108-
description: Invalid API key.
109-
content:
110-
application/json:
111-
schema:
112-
$ref: '#/components/schemas/responseSchema'
113-
example:
114-
status: 401
115-
message: Invalid API key.
116-
error:
117-
code: INVALID_API_KEY
118-
description: The API key you provided is invalid.
119-
/embeddings/insert:
60+
/api/v1/embeddings/{indexName}/insert:
12061
put:
12162
summary: Insert embeddings
12263
operationId: insertEmbeddings
12364
description: Inserts a set of embeddings into the database.
65+
parameters:
66+
- name: indexName
67+
in: path
68+
description: Name of the index
69+
required: true
70+
schema:
71+
type: string
12472
requestBody:
12573
required: true
12674
content:
@@ -158,11 +106,18 @@ paths:
158106
error:
159107
code: EMBEDDINGS_SKIPPED
160108
description: detailed description of the error...
161-
/embeddings/upsert:
109+
/api/v1/embeddings/{indexName}/upsert:
162110
put:
163111
summary: Upsert embeddings
164112
operationId: upsertEmbeddings
165113
description: Upserts a set of embeddings into the database (insert and update embedding if it already exists).
114+
parameters:
115+
- name: indexName
116+
in: path
117+
description: Name of the index
118+
required: true
119+
schema:
120+
type: string
166121
requestBody:
167122
required: true
168123
content:
@@ -200,11 +155,18 @@ paths:
200155
error:
201156
code: EMBEDDINGS_SKIPPED
202157
description: detailed description of the error...
203-
/embeddings/delete:
158+
/api/v1/embeddings/{indexName}/delete:
204159
delete:
205160
summary: Delete embeddings
206161
operationId: deleteEmbeddings
207162
description: Delete a set of embeddings using IDs.
163+
parameters:
164+
- name: indexName
165+
in: path
166+
description: Name of the index
167+
required: true
168+
schema:
169+
type: string
208170
requestBody:
209171
required: true
210172
content:
@@ -243,11 +205,18 @@ paths:
243205
code: EMBEDDINGS_SKIPPED
244206
description:
245207
- embedding with ID 87 was not deleted - embedding with ID 87 does not exist
246-
/embeddings/retrieve:
208+
/api/v1/embeddings/{indexName}/retrieve:
247209
post:
248210
summary: Retrieve embeddings
249211
operationId: retrieveEmbeddings
250212
description: Retrieve a set of embeddings using IDs.
213+
parameters:
214+
- name: indexName
215+
in: path
216+
description: Name of the index
217+
required: true
218+
schema:
219+
type: string
251220
requestBody:
252221
required: true
253222
content:
@@ -301,11 +270,18 @@ paths:
301270
code: EMBEDDINGS_SKIPPED
302271
description:
303272
- embedding with ID 87 was not retrieved - embedding with ID 87 does not exist
304-
/embeddings/search:
273+
/api/v1/embeddings/{indexName}/search:
305274
post:
306275
summary: Search for embeddings
307276
operationId: searchEmbedding
308277
description: Search for embeddings using vector similarity search
278+
parameters:
279+
- name: indexName
280+
in: path
281+
description: Name of the index
282+
required: true
283+
schema:
284+
type: string
309285
requestBody:
310286
required: true
311287
content:
@@ -372,173 +348,3 @@ paths:
372348
error:
373349
code: SIMILARITY_SEARCH_ERROR
374350
description: detailed description of the error...
375-
# /update-config/persistence/time-interval:
376-
# post:
377-
# summary: Update persistence interval
378-
# operationId: updatePersistenceTimeInterval
379-
# description: Modify the time interval at which vectors in memory are persisted on disk.
380-
# requestBody:
381-
# required: true
382-
# content:
383-
# application/json:
384-
# schema:
385-
# type: object
386-
# required:
387-
# - updatedValueSecs
388-
# properties:
389-
# updatedValueSecs:
390-
# type: number
391-
# format: float
392-
# description: The new time interval in seconds
393-
# responses:
394-
# '200':
395-
# description: Time interval successfully updated.
396-
# content:
397-
# application/json:
398-
# schema:
399-
# $ref: '#/components/schemas/responseSchema'
400-
# example:
401-
# status: 200
402-
# message: Time interval updated.
403-
# '500':
404-
# description: An error occured.
405-
# content:
406-
# application/json:
407-
# schema:
408-
# $ref: '#/components/schemas/responseSchema'
409-
# example:
410-
# status: 500
411-
# message: An error occured.
412-
# error:
413-
# code: ERROR_UPDATING_PERSISTENCE_TIME_INTERVAL
414-
# description: detailed description of the error...
415-
# /update-config/api/port:
416-
# post:
417-
# summary: Update the API port
418-
# operationId: updateApiPort
419-
# description: Update the port on which the API runs (default = 8080). EigenDB must be restarted this to take effect.
420-
# requestBody:
421-
# required: true
422-
# content:
423-
# application/json:
424-
# schema:
425-
# type: object
426-
# required:
427-
# - updatedPort
428-
# properties:
429-
# updatedPort:
430-
# type: number
431-
# format: int
432-
# description: The new port number
433-
# responses:
434-
# '200':
435-
# description: API port successfully updated.
436-
# content:
437-
# application/json:
438-
# schema:
439-
# $ref: '#/components/schemas/responseSchema'
440-
# example:
441-
# status: 200
442-
# message: API port updated. Please restart the database for it to take effect.
443-
# '500':
444-
# description: An error occured.
445-
# content:
446-
# application/json:
447-
# schema:
448-
# $ref: '#/components/schemas/responseSchema'
449-
# example:
450-
# status: 500
451-
# message: An error occured.
452-
# error:
453-
# code: ERROR_UPDATING_API_PORT
454-
# description: detailed description of the error...
455-
# /update-config/api/address:
456-
# post:
457-
# summary: Update the API address
458-
# operationId: updateApiAddress
459-
# description: Update the address on which the API runs (default = 0.0.0.0). EigenDB must be restarted this to take effect.
460-
# requestBody:
461-
# required: true
462-
# content:
463-
# application/json:
464-
# schema:
465-
# type: object
466-
# required:
467-
# - updatedAddress
468-
# properties:
469-
# updatedAddress:
470-
# type: string
471-
# description: The new API address
472-
# responses:
473-
# '200':
474-
# description: API address successfully updated.
475-
# content:
476-
# application/json:
477-
# schema:
478-
# $ref: '#/components/schemas/responseSchema'
479-
# example:
480-
# status: 200
481-
# message: API address updated. Please restart the database for it to take effect.
482-
# '500':
483-
# description: An error occured.
484-
# content:
485-
# application/json:
486-
# schema:
487-
# $ref: '#/components/schemas/responseSchema'
488-
# example:
489-
# status: 500
490-
# message: An error occured.
491-
# error:
492-
# code: ERROR_UPDATING_API_ADDRESS
493-
# description: detailed description of the error...
494-
# /update-config/hnsw-params/similarity-metric:
495-
# post:
496-
# summary: Update the similarity metric
497-
# operationId: updateSimilarityMetric
498-
# description: Update the similarity metric used in similarity search (default = euclidean). EigenDB must be restarted this to take effect.
499-
# requestBody:
500-
# required: true
501-
# content:
502-
# application/json:
503-
# schema:
504-
# type: object
505-
# required:
506-
# - updatedMetric
507-
# properties:
508-
# updatedMetric:
509-
# type: string
510-
# description: The new similarity metric (cosine, euclidean, ip)
511-
# responses:
512-
# '200':
513-
# description: Similarity metric successfully updated.
514-
# content:
515-
# application/json:
516-
# schema:
517-
# $ref: '#/components/schemas/responseSchema'
518-
# example:
519-
# status: 200
520-
# message: Vector similarity metric updated. Please restart the database for it to take effect.
521-
# '400':
522-
# description: Invalid similarity metric.
523-
# content:
524-
# application/json:
525-
# schema:
526-
# $ref: '#/components/schemas/responseSchema'
527-
# example:
528-
# status: 400
529-
# message: Something went wrong when trying to update the similarity metric.
530-
# error:
531-
# code: INVALID_SIMILARITY_METRIC
532-
# description: detailed description of the error...
533-
# '500':
534-
# description: An error occured.
535-
# content:
536-
# application/json:
537-
# schema:
538-
# $ref: '#/components/schemas/responseSchema'
539-
# example:
540-
# status: 500
541-
# message: An error occured.
542-
# error:
543-
# code: ERROR_UPDATING_SIMILARITY_METRIC
544-
# description: detailed description of the error...

0 commit comments

Comments
 (0)