Skip to content

Commit

Permalink
Connected notion fetch & chatgpt
Browse files Browse the repository at this point in the history
  • Loading branch information
vanjaoljaca committed Jul 15, 2023
1 parent 760313d commit 67256ca
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 81 deletions.
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/vanjacloud.azurefunc.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 0 additions & 75 deletions chatGPT.ts

This file was deleted.

14 changes: 14 additions & 0 deletions main/ThoughtProcessing.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// testable-http-triggered-function/__tests__/index.test.ts

Check failure on line 1 in main/ThoughtProcessing.test.ts

View workflow job for this annotation

GitHub Actions / build-and-deploy

Property 'getLatest' does not exist on type 'ThoughtDB'.

import * as sut from './scrape'
import { ThoughtDB } from "vanjacloud.shared.js/dist/src/notion";
import keys from '../keys'
import moment from 'moment'

describe('scrape', () => {
it.only('works', async () => {
const db = new ThoughtDB(keys.notion, ThoughtDB.testdbid)

const latest = db.getLatest(moment.duration(1, 'week'))
})
})
5 changes: 1 addition & 4 deletions main/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import assert from "assert";
// todo: https://github.com/anthonychu/azure-functions-test-utils


import MyModule from 'vanjacloudjs.shared';

console.log(MyModule.myThing)

import MyModule from 'vanjacloud.shared.js';

describe('azure function handler', () => {
const paths = [
Expand Down
2 changes: 1 addition & 1 deletion main/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AzureFunction, Context, HttpRequest } from "@azure/functions"

Check failure on line 1 in main/index.ts

View workflow job for this annotation

GitHub Actions / build-and-deploy

Module '"vanjacloud.shared.js"' has no exported member 'ChatGPT'. Did you mean to use 'import ChatGPT from "vanjacloud.shared.js"' instead?
import * as df from "durable-functions"
import * as scrape from './scrape'
import { ChatGPT } from '../chatGPT'
import { ChatGPT } from "vanjacloud.shared.js";
import OpenAI from "openai";

import * as path from 'path';
Expand Down
2 changes: 1 addition & 1 deletion play.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import fetch from 'node-fetch';

import dotenv from 'dotenv';
import axios from 'axios';
import { ChatGPT } from "./chatGPT";
import { ChatGPT } from "../vanjacloud.shared.js/src/chatGPT";

dotenv.config();

Expand Down

0 comments on commit 67256ca

Please sign in to comment.