• Configures a Pinecone retriever.

    Type Parameters

    Parameters

    • ai: Genkit

      A Genkit instance

    • params: {
          clientParams?: PineconeConfiguration;
          contentKey?: string;
          embedder: EmbedderArgument<EmbedderCustomOptions>;
          embedderOptions?: TypeOf<EmbedderCustomOptions>;
          indexId: string;
          textKey?: string;
      }

      The params for the retriever

      • OptionalclientParams?: PineconeConfiguration

        PineconeConfiguration containing the PINECONE_API_KEY. If not set, the PINECONE_API_KEY environment variable will be used instead.

      • OptionalcontentKey?: string

        The metadata key that contains the content. If not specified, the value '_content' is used by default.

      • embedder: EmbedderArgument<EmbedderCustomOptions>

        The embedder to use for the retriever

      • OptionalembedderOptions?: TypeOf<EmbedderCustomOptions>

        Options to customize the embedder

      • indexId: string

        The name of the retriever

      • OptionaltextKey?: string

        use contentKey instead.

    Returns RetrieverAction<
        ZodObject<
            extendShape<
                { k: ZodOptional<ZodNumber> },
                {
                    filter: ZodOptional<ZodRecord<ZodString, ZodAny>>;
                    k: ZodNumber;
                    namespace: ZodOptional<ZodString>;
                    sparseVector: ZodOptional<
                        ZodEffects<
                            ZodObject<
                                {
                                    indices: ZodArray<ZodNumber, "many">;
                                    values: ZodArray<ZodNumber, "many">;
                                },
                                "strip",
                                ZodTypeAny,
                                { indices: number[]; values: number[] },
                                { indices: number[]; values: number[] },
                            >,
                            { indices: number[]; values: number[] },
                            { indices: number[]; values: number[] },
                        >,
                    >;
                },
            >,
            "strip",
            ZodTypeAny,
            {
                filter?: Record<string, any>;
                k: number;
                namespace?: string;
                sparseVector?: { indices: number[]; values: number[] };
            },
            {
                filter?: Record<string, any>;
                k: number;
                namespace?: string;
                sparseVector?: { indices: number[]; values: number[] };
            },
        >,
    >

    A Pinecone retriever