| 75 | } |
| 76 | |
| 77 | export interface Store { |
| 78 | /** |
| 79 | * List files in a store as an async iterator |
| 80 | * |
| 81 | * @param storeId - The ID of the store |
| 82 | * @param options - Optional filtering options |
| 83 | * @param options.pathPrefix - Only return files whose path starts with this prefix |
| 84 | */ |
| 85 | listFiles( |
| 86 | storeId: string, |
| 87 | options?: ListFilesOptions, |
| 88 | ): AsyncGenerator<StoreFile>; |
| 89 | |
| 90 | /** |
| 91 | * Upload a file to a store |
| 92 | */ |
| 93 | uploadFile( |
| 94 | storeId: string, |
| 95 | file: File | ReadableStream, |
| 96 | options: UploadFileOptions, |
| 97 | ): Promise<void>; |
| 98 | |
| 99 | /** |
| 100 | * Delete a file from a store by its external ID |
| 101 | */ |
| 102 | deleteFile(storeId: string, externalId: string): Promise<void>; |
| 103 | |
| 104 | /** |
| 105 | * Search in one or more stores |
| 106 | */ |
| 107 | search( |
| 108 | storeIds: string[], |
| 109 | query: string, |
| 110 | top_k?: number, |
| 111 | search_options?: SearchOptions, |
| 112 | filters?: SearchFilter, |
| 113 | ): Promise<SearchResponse>; |
| 114 | |
| 115 | /** |
| 116 | * Retrieve store information |
| 117 | */ |
| 118 | retrieve(storeId: string): Promise<unknown>; |
| 119 | |
| 120 | /** |
| 121 | * Create a new store |
| 122 | */ |
| 123 | create(options: CreateStoreOptions): Promise<unknown>; |
| 124 | |
| 125 | /** |
| 126 | * Ask a question to one or more stores |
| 127 | */ |
| 128 | ask( |
| 129 | storeIds: string[], |
| 130 | question: string, |
| 131 | top_k?: number, |
| 132 | search_options?: SearchOptions, |
| 133 | filters?: SearchFilter, |
| 134 | ): Promise<AskResponse>; |
no outgoing calls
no test coverage detected