Genkit JS API reference
    Preparing search index...

    Function configurePineconeRetriever

    • Configures a Pinecone retriever.

      Type Parameters

      Parameters

      • ai: Genkit

        A Genkit instance

      • params: {
            clientParams?: PineconeConfiguration;
            contentKey?: string;
            embedder: EmbedderArgument<EmbedderCustomOptions>;
            embedderOptions?: z.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?: z.TypeOf<EmbedderCustomOptions>

          Options to customize the embedder

        • indexId: string

          The name of the retriever

        • OptionaltextKey?: string

          use contentKey instead.

      Returns RetrieverAction<
          z.ZodObject<
              {} & {
                  filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
                  k: z.ZodNumber;
                  namespace: z.ZodOptional<z.ZodString>;
                  sparseVector: z.ZodOptional<
                      z.ZodEffects<
                          z.ZodObject<
                              {
                                  indices: z.ZodArray<z.ZodNumber, "many">;
                                  values: z.ZodArray<z.ZodNumber, "many">;
                              },
                              "strip",
                              z.ZodTypeAny,
                              { indices: number[]; values: number[] },
                              { indices: number[]; values: number[] },
                          >,
                          { indices: number[]; values: number[] },
                          { indices: number[]; values: number[] },
                      >,
                  >;
              },
              "strip",
              z.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