langchain-stripe-loader 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -30,7 +30,15 @@ const loader = new StripeDocsDocumentLoader();
30
30
  const documents = await loader.load();
31
31
 
32
32
  // Or specify a different locale
33
- const jaDocuments = await loader.load('ja-JP');
33
+ const jaDocuments = await loader.load({
34
+ locale: 'ja-JP',
35
+ });
36
+
37
+ // Load documents with specific options
38
+ const customDocuments = await loader.load({
39
+ resource: 'connect', // Filter by resource path
40
+ excludeResources: ['connect/account-balances'],
41
+ });
34
42
 
35
43
  // Use the documents with your LangChain application
36
44
  console.log(`Loaded ${documents.length} documents`);
@@ -50,7 +58,7 @@ const documents = await loader.load();
50
58
  // Load documents with specific options
51
59
  const customDocuments = await loader.load({
52
60
  resource: '/jobs', // Filter by resource path
53
- locale: 'en-US', // Specify locale
61
+ locale: 'en-US', // Specify locale
54
62
  });
55
63
 
56
64
  // Load specific URLs
@@ -109,4 +117,4 @@ constructor(debug: boolean = false)
109
117
 
110
118
  ## License
111
119
 
112
- MIT
120
+ MIT
@@ -1 +1 @@
1
- {"version":3,"file":"StripeComLoader.d.ts","sourceRoot":"","sources":["../src/StripeComLoader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAcrD;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,kBAAkB;IACjD,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,GAAE,OAAe;IAGnD;;;;OAIG;cACa,oBAAoB,CAAC,QAAQ,CAAC,EAAE,MAAM;IAUtD;;;;;OAKG;YACW,qBAAqB;IAmBnC;;;;;OAKG;YACW,wBAAwB;IAStC;;;;;;;OAOG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;KACjB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;CAoBxB"}
1
+ {"version":3,"file":"StripeComLoader.d.ts","sourceRoot":"","sources":["../src/StripeComLoader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAcrD;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,kBAAkB;IACjD,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,GAAE,OAAe;IAGnD;;;;OAIG;cACa,oBAAoB,CAAC,QAAQ,CAAC,EAAE,MAAM;IAUtD;;;;;OAKG;YACW,qBAAqB;IAmBnC;;;;;OAKG;YACW,wBAAwB;IAStC;;;;;;;OAOG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;KACjB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;CAuBxB"}
@@ -18,11 +18,17 @@ export declare class StripeDocsDocumentLoader extends BaseDocumentLoader {
18
18
  * @returns {Promise<StripeDocsArticle[]>} Array of article objects
19
19
  */
20
20
  private fetchArticlesFromSitemap;
21
+ private fetchArticlesFromURLs;
21
22
  /**
22
23
  * Loads documents from Stripe Docs
23
24
  * @param {string} locale Locale for the content (defaults to 'en-US')
24
25
  * @returns {Promise<Document[]>} Array of LangChain documents
25
26
  */
26
- load(locale?: string): Promise<Document[]>;
27
+ load(options?: {
28
+ locale: string;
29
+ urls?: string[];
30
+ resource?: string;
31
+ excludeResources?: string[];
32
+ }): Promise<Document[]>;
27
33
  }
28
34
  //# sourceMappingURL=StripeDocsLoader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StripeDocsLoader.d.ts","sourceRoot":"","sources":["../src/StripeDocsLoader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAarD;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,kBAAkB;IAClD,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,GAAE,OAAe;IAGnD;;;OAGG;cACa,oBAAoB;IAOpC;;;;OAIG;YACW,wBAAwB;IAiBtC;;;;OAIG;IACG,IAAI,CAAC,MAAM,GAAE,MAAgB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;CAgB1D"}
1
+ {"version":3,"file":"StripeDocsLoader.d.ts","sourceRoot":"","sources":["../src/StripeDocsLoader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAcrD;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,kBAAkB;IAClD,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,GAAE,OAAe;IAGnD;;;OAGG;cACa,oBAAoB;IAOpC;;;;OAIG;YACW,wBAAwB;YAexB,qBAAqB;IAiCnC;;;;OAIG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;KAC7B,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;CAuBxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=StripeDocsLoader.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StripeDocsLoader.spec.d.ts","sourceRoot":"","sources":["../src/StripeDocsLoader.spec.ts"],"names":[],"mappings":""}