File size: 541 Bytes
58faf93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
export type AppConfig = {
  connectionString: string
  currentCollection: string
  authType: string
  token: string
  username: string
  password: string
  tenant: string
  database: string
}

export type Collection = string

export type Record = {
  id: string
  document: string
  metadata: { source: string }
  embedding: number[]
  distance: number
}

export type RecordsPage = {
  total: number
  page: number
  records: Record[]
}

export type ErrorResponse = {
  error: string
}

export type QueryResult = RecordsPage | ErrorResponse