File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,10 @@ import {
1111 StreamedTokens ,
1212 ProgressMessage ,
1313 DateFilterValue ,
14- MappedSearchModeResponse ,
14+ // MappedSearchModeResponse,
1515 WeaviateObjectWithCollection ,
1616 WeaviateReturnWithCollection ,
17+ SearchModeResponse ,
1718} from "./response.js" ;
1819
1920import {
@@ -360,11 +361,11 @@ export const mapWeviateSearchResults = (
360361export const mapSearchOnlyResponse = (
361362 response : ApiSearchModeResponse ,
362363) : {
363- mappedResponse : MappedSearchModeResponse ;
364+ mappedResponse : Omit < SearchModeResponse , "next" > ;
364365 apiSearches : ApiSearchResult [ ] | undefined ;
365366} => {
366367 const apiSearches = response . searches ;
367- const mappedResponse : MappedSearchModeResponse = {
368+ const mappedResponse : Omit < SearchModeResponse , "next" > = {
368369 originalQuery : response . original_query ,
369370 searches : apiSearches ? mapInnerSearches ( apiSearches ) : undefined ,
370371 usage : mapUsage ( response . usage ) ,
Original file line number Diff line number Diff line change @@ -271,14 +271,6 @@ export type WeaviateReturnWithCollection = WeaviateReturn<undefined> & {
271271 objects : WeaviateObjectWithCollection [ ] ;
272272} ;
273273
274- export type MappedSearchModeResponse = {
275- originalQuery : string ;
276- searches ?: SearchResult [ ] ;
277- usage : Usage ;
278- totalTime : number ;
279- searchResults : WeaviateReturnWithCollection ;
280- } ;
281-
282274/** Options for the executing a prepared QueryAgent search. */
283275export type SearchExecutionOptions = {
284276 /** The maximum number of results to return. */
@@ -287,6 +279,11 @@ export type SearchExecutionOptions = {
287279 offset ?: number ;
288280} ;
289281
290- export type SearchModeResponse = MappedSearchModeResponse & {
282+ export type SearchModeResponse = {
283+ originalQuery : string ;
284+ searches ?: SearchResult [ ] ;
285+ usage : Usage ;
286+ totalTime : number ;
287+ searchResults : WeaviateReturnWithCollection ;
291288 next : ( options : SearchExecutionOptions ) => Promise < SearchModeResponse > ;
292289} ;
You can’t perform that action at this time.
0 commit comments