weaviate-client
    Preparing search index...

    Interface Generate<T, V>

    interface Generate<T, V> {
        fetchObjects: <
            C extends GenerativeConfigRuntime
            | undefined = undefined,
        >(
            generate: GenerateOptions<T, C>,
            opts?: FetchObjectsOptions<T, V>,
        ) => Promise<GenerativeReturn<T, V, C>>;
        bm25<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            query: string,
            generate: GenerateOptions<T, C>,
            opts?: BaseBm25Options<T, I>,
        ): Promise<GenerativeReturn<T, RV, C>>;
        bm25<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            query: string,
            generate: GenerateOptions<T, C>,
            opts: GroupByBm25Options<T, I>,
        ): Promise<GenerativeGroupByReturn<T, RV, C>>;
        bm25<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            query: string,
            generate: GenerateOptions<T, C>,
            opts?: Bm25Options<T, I>,
        ): GenerateReturn<T, RV, C>;
        hybrid<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            query: string,
            generate: GenerateOptions<T, C>,
            opts?: BaseHybridOptions<T, V, I>,
        ): Promise<GenerativeReturn<T, RV, C>>;
        hybrid<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            query: string,
            generate: GenerateOptions<T, C>,
            opts: GroupByHybridOptions<T, V, I>,
        ): Promise<GenerativeGroupByReturn<T, RV, C>>;
        hybrid<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            query: string,
            generate: GenerateOptions<T, C>,
            opts?: HybridOptions<T, V, I>,
        ): GenerateReturn<T, RV, C>;
        nearMedia<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            media: string | Buffer<ArrayBufferLike>,
            type: NearMediaType,
            generate: GenerateOptions<T, C>,
            opts?: BaseNearOptions<T, V, I>,
        ): Promise<GenerativeReturn<T, RV, C>>;
        nearMedia<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            media: string | Buffer<ArrayBufferLike>,
            type: NearMediaType,
            generate: GenerateOptions<T, C>,
            opts: GroupByNearOptions<T, V, I>,
        ): Promise<GenerativeGroupByReturn<T, RV, C>>;
        nearMedia<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            media: string | Buffer<ArrayBufferLike>,
            type: NearMediaType,
            generate: GenerateOptions<T, C>,
            opts?: NearOptions<T, V, I>,
        ): GenerateReturn<T, RV, C>;
        nearObject<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            id: string,
            generate: GenerateOptions<T, C>,
            opts?: BaseNearOptions<T, V, I>,
        ): Promise<GenerativeReturn<T, RV, C>>;
        nearObject<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            id: string,
            generate: GenerateOptions<T, C>,
            opts: GroupByNearOptions<T, V, I>,
        ): Promise<GenerativeGroupByReturn<T, RV, C>>;
        nearObject<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            id: string,
            generate: GenerateOptions<T, C>,
            opts?: NearOptions<T, V, I>,
        ): GenerateReturn<T, RV, C>;
        nearText<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            query: string | string[],
            generate: GenerateOptions<T, C>,
            opts?: BaseNearTextOptions<T, V, I>,
        ): Promise<GenerativeReturn<T, RV, C>>;
        nearText<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            query: string | string[],
            generate: GenerateOptions<T, C>,
            opts: GroupByNearTextOptions<T, V, I>,
        ): Promise<GenerativeGroupByReturn<T, RV, C>>;
        nearText<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            query: string | string[],
            generate: GenerateOptions<T, C>,
            opts?: NearTextOptions<T, V, I>,
        ): GenerateReturn<T, RV, C>;
        nearVector<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            vector: NearVectorInputType,
            generate: GenerateOptions<T, C>,
            opts?: BaseNearOptions<T, V, I>,
        ): Promise<GenerativeReturn<T, RV, C>>;
        nearVector<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            vector: NearVectorInputType,
            generate: GenerateOptions<T, C>,
            opts: GroupByNearOptions<T, V, I>,
        ): Promise<GenerativeGroupByReturn<T, RV, C>>;
        nearVector<
            I extends IncludeVector<V>,
            RV,
            C extends GenerativeConfigRuntime | undefined = undefined,
        >(
            vector: NearVectorInputType,
            generate: GenerateOptions<T, C>,
            opts?: NearOptions<T, V, I>,
        ): GenerateReturn<T, RV, C>;
    }

    Type Parameters

    • T
    • V

    Hierarchy

    • Bm25<T, V>
    • Hybrid<T, V>
    • NearMedia<T, V>
    • NearObject<T, V>
    • NearText<T, V>
    • NearVector<T, V>
      • Generate
    Index

    Properties

    fetchObjects: <C extends GenerativeConfigRuntime | undefined = undefined>(
        generate: GenerateOptions<T, C>,
        opts?: FetchObjectsOptions<T, V>,
    ) => Promise<GenerativeReturn<T, V, C>>

    Methods

    • 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 for a more detailed explanation.

      This overload is for performing a search without the groupBy param.

      Type Parameters

      Parameters

      • query: string

        The query to search for.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • Optionalopts: BaseHybridOptions<T, V, I>

        The available options for performing the hybrid search.

      Returns Promise<GenerativeReturn<T, RV, C>>

      • The results of the search including the generated data.
    • 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 for a more detailed explanation.

      This overload is for performing a search with the groupBy param.

      Type Parameters

      Parameters

      • query: string

        The query to search for.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • opts: GroupByHybridOptions<T, V, I>

        The available options for performing the hybrid search.

      Returns Promise<GenerativeGroupByReturn<T, RV, C>>

      • The results of the search including the generated data grouped by the specified properties.
    • 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 for a more detailed explanation.

      This overload is for performing a search with a programmatically defined opts param.

      Type Parameters

      Parameters

      • query: string

        The query to search for.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • Optionalopts: HybridOptions<T, V, I>

        The available options for performing the hybrid search.

      Returns GenerateReturn<T, RV, C>

      • The results of the search including the generated data.
    • 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 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.

      Type Parameters

      Parameters

      • media: string | Buffer<ArrayBufferLike>

        The media file to search on. This can be a base64 string, a file path string, or a buffer.

      • type: NearMediaType

        The type of media to search on.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • Optionalopts: BaseNearOptions<T, V, I>

        The available options for performing the near-media search.

      Returns Promise<GenerativeReturn<T, RV, C>>

      • The results of the search including the generated data.
    • 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 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.

      Type Parameters

      Parameters

      • media: string | Buffer<ArrayBufferLike>

        The media file to search on. This can be a base64 string, a file path string, or a buffer.

      • type: NearMediaType

        The type of media to search on.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • opts: GroupByNearOptions<T, V, I>

        The available options for performing the near-media search.

      Returns Promise<GenerativeGroupByReturn<T, RV, C>>

      • The results of the search including the generated data grouped by the specified properties.
    • 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 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.

      Type Parameters

      Parameters

      • media: string | Buffer<ArrayBufferLike>

        The media to search on. This can be a base64 string, a file path string, or a buffer.

      • type: NearMediaType

        The type of media to search on.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • Optionalopts: NearOptions<T, V, I>

        The available options for performing the near-media search.

      Returns GenerateReturn<T, RV, C>

      • The results of the search including the generated data.
    • 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 for a more detailed explanation.

      This overload is for performing a search without the groupBy param.

      Type Parameters

      Parameters

      • id: string

        The ID of the object to search for.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • Optionalopts: BaseNearOptions<T, V, I>

        The available options for performing the near-object search.

      Returns Promise<GenerativeReturn<T, RV, C>>

      • The results of the search including the generated data.
    • 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 for a more detailed explanation.

      This overload is for performing a search with the groupBy param.

      Type Parameters

      Parameters

      • id: string

        The ID of the object to search for.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • opts: GroupByNearOptions<T, V, I>

        The available options for performing the near-object search.

      Returns Promise<GenerativeGroupByReturn<T, RV, C>>

      • The results of the search including the generated data grouped by the specified properties.
    • 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 for a more detailed explanation.

      This overload is for performing a search with a programmatically defined opts param.

      Type Parameters

      Parameters

      • id: string

        The ID of the object to search for.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • Optionalopts: NearOptions<T, V, I>

        The available options for performing the near-object search.

      Returns GenerateReturn<T, RV, C>

      • The results of the search including the generated data.
    • 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 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.

      Type Parameters

      Parameters

      • query: string | string[]

        The query to search for.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • Optionalopts: BaseNearTextOptions<T, V, I>

        The available options for performing the near-text search.

      Returns Promise<GenerativeReturn<T, RV, C>>

      • The results of the search including the generated data.
    • 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 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.

      Type Parameters

      Parameters

      • query: string | string[]

        The query to search for.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • opts: GroupByNearTextOptions<T, V, I>

        The available options for performing the near-text search.

      Returns Promise<GenerativeGroupByReturn<T, RV, C>>

      • The results of the search including the generated data grouped by the specified properties.
    • 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 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.

      Type Parameters

      Parameters

      • query: string | string[]

        The query to search for.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • Optionalopts: NearTextOptions<T, V, I>

        The available options for performing the near-text search.

      Returns GenerateReturn<T, RV, C>

      • The results of the search including the generated data.
    • 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 for a more detailed explanation.

      This overload is for performing a search without the groupBy param.

      Type Parameters

      Parameters

      • vector: NearVectorInputType

        The vector(s) to search for.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • Optionalopts: BaseNearOptions<T, V, I>

        The available options for performing the near-vector search.

      Returns Promise<GenerativeReturn<T, RV, C>>

      • The results of the search including the generated data.
    • 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 for a more detailed explanation.

      This overload is for performing a search with the groupBy param.

      Type Parameters

      Parameters

      • vector: NearVectorInputType

        The vector(s) to search for.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • opts: GroupByNearOptions<T, V, I>

        The available options for performing the near-vector search.

      Returns Promise<GenerativeGroupByReturn<T, RV, C>>

      • The results of the search including the generated data grouped by the specified properties.
    • 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 for a more detailed explanation.

      This overload is for performing a search with a programmatically defined opts param.

      Type Parameters

      Parameters

      • vector: NearVectorInputType

        The vector(s) to search for.

      • generate: GenerateOptions<T, C>

        The available options for performing the generation.

      • Optionalopts: NearOptions<T, V, I>

        The available options for performing the near-vector search.

      Returns GenerateReturn<T, RV, C>

      • The results of the search including the generated data.