epist 0.1.1 → 1.2.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
@@ -23,6 +23,10 @@ const client = new Epist({
23
23
  const audio = await client.uploadFile(file);
24
24
  console.log(`Processing: ${audio.id}`);
25
25
 
26
+ // 2. Ingest entire RSS Feed (Beta)
27
+ const feed = await client.ingestRss("https://podcast.rss/feed.xml");
28
+ console.log(`Feed synced: ${feed.name}`);
29
+
26
30
  // 2. Semantic Search
27
31
  const results = await client.search('What were the key takeaways?');
28
32
  results.forEach(res => {
@@ -59,4 +59,8 @@ export declare class Epist {
59
59
  * Search the knowledge base
60
60
  */
61
61
  search(query: string, limit?: number, options?: Record<string, any>): Promise<SearchResult[]>;
62
+ /**
63
+ * Ingest a podcast RSS feed
64
+ */
65
+ ingestRss(url: string, name?: string, refreshIntervalMinutes?: number): Promise<any>;
62
66
  }
package/dist/cjs/index.js CHANGED
@@ -121,5 +121,23 @@ class Epist {
121
121
  throw error;
122
122
  }
123
123
  }
124
+ /**
125
+ * Ingest a podcast RSS feed
126
+ */
127
+ async ingestRss(url, name, refreshIntervalMinutes) {
128
+ try {
129
+ const payload = { url };
130
+ if (name)
131
+ payload.name = name;
132
+ if (refreshIntervalMinutes)
133
+ payload.refresh_interval_minutes = refreshIntervalMinutes;
134
+ const response = await this.client.post('/ingest/rss', payload);
135
+ return response.data;
136
+ }
137
+ catch (error) {
138
+ this.handleError(error);
139
+ throw error;
140
+ }
141
+ }
124
142
  }
125
143
  exports.Epist = Epist;
package/dist/esm/index.js CHANGED
@@ -114,4 +114,22 @@ export class Epist {
114
114
  throw error;
115
115
  }
116
116
  }
117
+ /**
118
+ * Ingest a podcast RSS feed
119
+ */
120
+ async ingestRss(url, name, refreshIntervalMinutes) {
121
+ try {
122
+ const payload = { url };
123
+ if (name)
124
+ payload.name = name;
125
+ if (refreshIntervalMinutes)
126
+ payload.refresh_interval_minutes = refreshIntervalMinutes;
127
+ const response = await this.client.post('/ingest/rss', payload);
128
+ return response.data;
129
+ }
130
+ catch (error) {
131
+ this.handleError(error);
132
+ throw error;
133
+ }
134
+ }
117
135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "epist",
3
- "version": "0.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "Official JavaScript/TypeScript SDK for Epist.ai",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/index.ts CHANGED
@@ -160,5 +160,22 @@ export class Epist {
160
160
  throw error;
161
161
  }
162
162
  }
163
+
164
+ /**
165
+ * Ingest a podcast RSS feed
166
+ */
167
+ async ingestRss(url: string, name?: string, refreshIntervalMinutes?: number): Promise<any> {
168
+ try {
169
+ const payload: any = { url };
170
+ if (name) payload.name = name;
171
+ if (refreshIntervalMinutes) payload.refresh_interval_minutes = refreshIntervalMinutes;
172
+
173
+ const response = await this.client.post('/ingest/rss', payload);
174
+ return response.data;
175
+ } catch (error) {
176
+ this.handleError(error);
177
+ throw error;
178
+ }
179
+ }
163
180
  }
164
181