get it working with text files 🎉

This commit is contained in:
2023-04-09 15:33:46 -04:00
parent 68e04af5df
commit deb6052de8
10 changed files with 626 additions and 56 deletions

5
src/lib/env.ts Normal file
View File

@@ -0,0 +1,5 @@
import * as dotenv from 'dotenv';
const config = dotenv.config();
const OPENAI_API_KEY = config.OPENAI_API_KEY;
export { OPENAI_API_KEY };

View File

@@ -1,5 +0,0 @@
import { writable } from 'svelte/store';
const prompt = writable<string>(JSON.stringify([]));
export default prompt;

View File

@@ -0,0 +1,5 @@
import { writable } from 'svelte/store';
const summary = writable<string>(JSON.stringify([]));
export default summary;

3
src/lib/types/env.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
declare module 'dotenv' {
function config(options?: DotenvParseOptions): { [name: string]: string };
}