Skip to content

Commit

Permalink
init misc
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Joseph Petro committed Sep 20, 2024
1 parent 79e061c commit e181a43
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions smart-sources-v1/adapters/pdf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { SourceAdapter } from "./_adapter.js";

export class SmartSourcesPdfAdapter extends SourceAdapter {
async _read() {
return await this.smart_source.fs.read(this.smart_source.data.path, 'base64');
}
async read() {
if(!this.data.content) {
const base64 = await this._read();
// PROBLEM: CANNOT USE PDF IN VISION API (2024-09-20)
}
// Return content from data.content
return this.data.content;

}

update() {
throw new Error('not available for file type');
}

create() {
throw new Error('not available for file type');
}
}
Empty file added smart-sources/blocks/_block.js
Empty file.
4 changes: 4 additions & 0 deletions smart-sources/blocks/markdown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export function parse_blocks(source) {
const {blocks, ...rest} = source.smart_chunks.parse(source);
source.collection.create_blocks(source, blocks);
}
Empty file added smart-sources/groups/_group.js
Empty file.
Empty file added smart-sources/groups/cluster.js
Empty file.
Empty file.

0 comments on commit e181a43

Please sign in to comment.