Type alias ApifyDatasetMappingFunction<Metadata>

ApifyDatasetMappingFunction<Metadata>: ((item) => Document<Metadata> | Document<Metadata>[] | Promise<Document<Metadata> | Document<Metadata>[]>)

Type Parameters

  • Metadata extends Record<string, any>

Type declaration

    • (item): Document<Metadata> | Document<Metadata>[] | Promise<Document<Metadata> | Document<Metadata>[]>
    • A type that represents a function that takes a single object (an Apify dataset item) and converts it to an instance of the Document class.

      Change function signature to only be asynchronous for simplicity in v0.1.0 https://github.com/langchain-ai/langchainjs/pull/3262

      Parameters

      • item: Record<string | number, unknown>

      Returns Document<Metadata> | Document<Metadata>[] | Promise<Document<Metadata> | Document<Metadata>[]>

Generated using TypeDoc