import { CallOptions } from '../query/index.js'; import { BaseBm25Options, BaseHybridOptions, BaseNearOptions, BaseNearTextOptions, Bm25Options, FetchObjectsOptions, GroupByBm25Options, GroupByHybridOptions, GroupByNearOptions, GroupByNearTextOptions, HybridOptions, NearMediaType, NearOptions, NearTextOptions, NearVectorInputType } from '../query/types.js'; import { GenerateOptions, GenerateReturn, GenerativeConfigRuntime, GenerativeGroupByReturn, GenerativeReturn, ReturnVectors } from '../types/index.js'; import { IncludeVector } from '../types/internal.js'; interface Bm25 { /** * Perform retrieval-augmented generation (RaG) on the results of a keyword-based BM25 search of objects in this collection. * * See the [docs](https://weaviate.io/developers/weaviate/search/bm25) for a more detailed explanation. * * This overload is for performing a search without the `groupBy` param. * * @param {string} query - The query to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {BaseBm25Options} [opts] - The available options for performing the BM25 search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {Promise>} - The results of the search including the generated data. */ bm25, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(query: string, generate: GenerateOptions, opts?: BaseBm25Options, callOpts?: CallOptions): Promise>; /** * Perform retrieval-augmented generation (RaG) on the results of a keyword-based BM25 search of objects in this collection. * * See the [docs](https://weaviate.io/developers/weaviate/search/bm25) for a more detailed explanation. * * This overload is for performing a search with the `groupBy` param. * * @param {string} query - The query to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {GroupByBm25Options} opts - The available options for performing the BM25 search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {Promise>} - The results of the search including the generated data grouped by the specified properties. */ bm25, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(query: string, generate: GenerateOptions, opts: GroupByBm25Options, callOpts?: CallOptions): Promise>; /** * Perform retrieval-augmented generation (RaG) on the results of a keyword-based BM25 search of objects in this collection. * * See the [docs](https://weaviate.io/developers/weaviate/search/bm25) for a more detailed explanation. * * This overload is for performing a search with a programmatically defined `opts` param. * * @param {string} query - The query to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {Bm25Options} [opts] - The available options for performing the BM25 search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {GenerateReturn} - The results of the search including the generated data. */ bm25, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(query: string, generate: GenerateOptions, opts?: Bm25Options, callOpts?: CallOptions): GenerateReturn; } interface Hybrid { /** * Perform retrieval-augmented generation (RaG) on the results of an object search in this collection using the hybrid algorithm blending keyword-based BM25 and vector-based similarity. * * See the [docs](https://weaviate.io/developers/weaviate/search/hybrid) for a more detailed explanation. * * This overload is for performing a search without the `groupBy` param. * * @param {string} query - The query to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {BaseHybridOptions} [opts] - The available options for performing the hybrid search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {Promise>} - The results of the search including the generated data. */ hybrid, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(query: string, generate: GenerateOptions, opts?: BaseHybridOptions, callOpts?: CallOptions): Promise>; /** * Perform retrieval-augmented generation (RaG) on the results of an object search in this collection using the hybrid algorithm blending keyword-based BM25 and vector-based similarity. * * See the [docs](https://weaviate.io/developers/weaviate/search/hybrid) for a more detailed explanation. * * This overload is for performing a search with the `groupBy` param. * * @param {string} query - The query to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {GroupByHybridOptions} opts - The available options for performing the hybrid search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {Promise>} - The results of the search including the generated data grouped by the specified properties. */ hybrid, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(query: string, generate: GenerateOptions, opts: GroupByHybridOptions, callOpts?: CallOptions): Promise>; /** * Perform retrieval-augmented generation (RaG) on the results of an object search in this collection using the hybrid algorithm blending keyword-based BM25 and vector-based similarity. * * See the [docs](https://weaviate.io/developers/weaviate/search/hybrid) for a more detailed explanation. * * This overload is for performing a search with a programmatically defined `opts` param. * * @param {string} query - The query to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {HybridOptions} [opts] - The available options for performing the hybrid search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {GenerateReturn} - The results of the search including the generated data. */ hybrid, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(query: string, generate: GenerateOptions, opts?: HybridOptions, callOpts?: CallOptions): GenerateReturn; } interface NearMedia { /** * Perform retrieval-augmented generation (RaG) on the results of a by-audio object search in this collection using an audio-capable vectorization module and vector-based similarity search. * * See the [docs](https://weaviate.io/developers/weaviate/modules/retriever-vectorizer-modules/multi2vec-bind) for a more detailed explanation. * * NOTE: You must have a multi-media-capable vectorization module installed in order to use this method, e.g. `multi2vec-bind`. * * This overload is for performing a search without the `groupBy` param. * * @param {string | Buffer} media - The media file to search on. This can be a base64 string, a file path string, or a buffer. * @param {NearMediaType} type - The type of media to search on. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {BaseNearOptions} [opts] - The available options for performing the near-media search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {Promise>} - The results of the search including the generated data. */ nearMedia, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(media: string | Buffer, type: NearMediaType, generate: GenerateOptions, opts?: BaseNearOptions, callOpts?: CallOptions): Promise>; /** * Perform retrieval-augmented generation (RaG) on the results of a by-audio object search in this collection using an audio-capable vectorization module and vector-based similarity search. * * See the [docs](https://weaviate.io/developers/weaviate/modules/retriever-vectorizer-modules/multi2vec-bind) for a more detailed explanation. * * NOTE: You must have a multi-media-capable vectorization module installed in order to use this method, e.g. `multi2vec-bind`. * * This overload is for performing a search with the `groupBy` param. * * @param {string | Buffer} media - The media file to search on. This can be a base64 string, a file path string, or a buffer. * @param {NearMediaType} type - The type of media to search on. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {GroupByNearOptions} opts - The available options for performing the near-media search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {Promise>} - The results of the search including the generated data grouped by the specified properties. */ nearMedia, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(media: string | Buffer, type: NearMediaType, generate: GenerateOptions, opts: GroupByNearOptions, callOpts?: CallOptions): Promise>; /** * Perform retrieval-augmented generation (RaG) on the results of a by-audio object search in this collection using an audio-capable vectorization module and vector-based similarity search. * * See the [docs](https://weaviate.io/developers/weaviate/modules/retriever-vectorizer-modules/multi2vec-bind) for a more detailed explanation. * * NOTE: You must have a multi-media-capable vectorization module installed in order to use this method, e.g. `multi2vec-bind`. * * This overload is for performing a search with a programmatically defined `opts` param. * * @param {string | Buffer} media - The media to search on. This can be a base64 string, a file path string, or a buffer. * @param {NearMediaType} type - The type of media to search on. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {NearOptions} [opts] - The available options for performing the near-media search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {GenerateReturn} - The results of the search including the generated data. */ nearMedia, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(media: string | Buffer, type: NearMediaType, generate: GenerateOptions, opts?: NearOptions, callOpts?: CallOptions): GenerateReturn; } interface NearObject { /** * Perform retrieval-augmented generation (RaG) on the results of a by-object object search in this collection using a vector-based similarity search. * * See the [docs](https://weaviate.io/developers/weaviate/api/graphql/search-operators#nearobject) for a more detailed explanation. * * This overload is for performing a search without the `groupBy` param. * * @param {string} id - The ID of the object to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {BaseNearOptions} [opts] - The available options for performing the near-object search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {Promise>} - The results of the search including the generated data. */ nearObject, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(id: string, generate: GenerateOptions, opts?: BaseNearOptions, callOpts?: CallOptions): Promise>; /** * Perform retrieval-augmented generation (RaG) on the results of a by-object object search in this collection using a vector-based similarity search. * * See the [docs](https://weaviate.io/developers/weaviate/api/graphql/search-operators#nearobject) for a more detailed explanation. * * This overload is for performing a search with the `groupBy` param. * * @param {string} id - The ID of the object to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {GroupByNearOptions} opts - The available options for performing the near-object search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {Promise>} - The results of the search including the generated data grouped by the specified properties. */ nearObject, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(id: string, generate: GenerateOptions, opts: GroupByNearOptions, callOpts?: CallOptions): Promise>; /** * Perform retrieval-augmented generation (RaG) on the results of a by-object object search in this collection using a vector-based similarity search. * * See the [docs](https://weaviate.io/developers/weaviate/api/graphql/search-operators#nearobject) for a more detailed explanation. * * This overload is for performing a search with a programmatically defined `opts` param. * * @param {string} id - The ID of the object to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {NearOptions} [opts] - The available options for performing the near-object search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {GenerateReturn} - The results of the search including the generated data. */ nearObject, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(id: string, generate: GenerateOptions, opts?: NearOptions, callOpts?: CallOptions): GenerateReturn; } interface NearText { /** * Perform retrieval-augmented generation (RaG) on the results of a by-image object search in this collection using the image-capable vectorization module and vector-based similarity search. * * See the [docs](https://weaviate.io/developers/weaviate/api/graphql/search-operators#neartext) for a more detailed explanation. * * NOTE: You must have a text-capable vectorization module installed in order to use this method, e.g. any of the `text2vec-` and `multi2vec-` modules. * * This overload is for performing a search without the `groupBy` param. * * @param {string | string[]} query - The query to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {BaseNearTextOptions} [opts] - The available options for performing the near-text search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {Promise>} - The results of the search including the generated data. */ nearText, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(query: string | string[], generate: GenerateOptions, opts?: BaseNearTextOptions, callOpts?: CallOptions): Promise>; /** * Perform retrieval-augmented generation (RaG) on the results of a by-image object search in this collection using the image-capable vectorization module and vector-based similarity search. * * See the [docs](https://weaviate.io/developers/weaviate/api/graphql/search-operators#neartext) for a more detailed explanation. * * NOTE: You must have a text-capable vectorization module installed in order to use this method, e.g. any of the `text2vec-` and `multi2vec-` modules. * * This overload is for performing a search with the `groupBy` param. * * @param {string | string[]} query - The query to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {GroupByNearTextOptions} opts - The available options for performing the near-text search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {Promise>} - The results of the search including the generated data grouped by the specified properties. */ nearText, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(query: string | string[], generate: GenerateOptions, opts: GroupByNearTextOptions, callOpts?: CallOptions): Promise>; /** * Perform retrieval-augmented generation (RaG) on the results of a by-image object search in this collection using the image-capable vectorization module and vector-based similarity search. * * See the [docs](https://weaviate.io/developers/weaviate/api/graphql/search-operators#neartext) for a more detailed explanation. * * NOTE: You must have a text-capable vectorization module installed in order to use this method, e.g. any of the `text2vec-` and `multi2vec-` modules. * * This overload is for performing a search with a programmatically defined `opts` param. * * @param {string | string[]} query - The query to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {NearTextOptions} [opts] - The available options for performing the near-text search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {GenerateReturn} - The results of the search including the generated data. */ nearText, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(query: string | string[], generate: GenerateOptions, opts?: NearTextOptions, callOpts?: CallOptions): GenerateReturn; } interface NearVector { /** * Perform retrieval-augmented generation (RaG) on the results of a by-vector object search in this collection using vector-based similarity search. * * See the [docs](https://weaviate.io/developers/weaviate/search/similarity) for a more detailed explanation. * * This overload is for performing a search without the `groupBy` param. * * @param {NearVectorInputType} vector - The vector(s) to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {BaseNearOptions} [opts] - The available options for performing the near-vector search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {Promise>} - The results of the search including the generated data. */ nearVector, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(vector: NearVectorInputType, generate: GenerateOptions, opts?: BaseNearOptions, callOpts?: CallOptions): Promise>; /** * Perform retrieval-augmented generation (RaG) on the results of a by-vector object search in this collection using vector-based similarity search. * * See the [docs](https://weaviate.io/developers/weaviate/search/similarity) for a more detailed explanation. * * This overload is for performing a search with the `groupBy` param. * * @param {NearVectorInputType} vector - The vector(s) to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {GroupByNearOptions} opts - The available options for performing the near-vector search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {Promise>} - The results of the search including the generated data grouped by the specified properties. */ nearVector, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(vector: NearVectorInputType, generate: GenerateOptions, opts: GroupByNearOptions, callOpts?: CallOptions): Promise>; /** * Perform retrieval-augmented generation (RaG) on the results of a by-vector object search in this collection using vector-based similarity search. * * See the [docs](https://weaviate.io/developers/weaviate/search/similarity) for a more detailed explanation. * * This overload is for performing a search with a programmatically defined `opts` param. * * @param {NearVectorInputType} vector - The vector(s) to search for. * @param {GenerateOptions} generate - The available options for performing the generation. * @param {NearOptions} [opts] - The available options for performing the near-vector search. * @param {CallOptions} [callOpts] - The available options for the API call. * @return {GenerateReturn} - The results of the search including the generated data. */ nearVector, RV extends ReturnVectors, C extends GenerativeConfigRuntime | undefined = undefined>(vector: NearVectorInputType, generate: GenerateOptions, opts?: NearOptions, callOpts?: CallOptions): GenerateReturn; } export interface Generate extends Bm25, Hybrid, NearMedia, NearObject, NearText, NearVector { fetchObjects: (generate: GenerateOptions, opts?: FetchObjectsOptions, callOpts?: CallOptions) => Promise>; } export {};