frankcollins3 / T.H.E.-

Take Home Exercise
0 stars 0 forks source link

fetch from web sources [11:14am] #2

Closed frankcollins3 closed 3 months ago

frankcollins3 commented 3 months ago

attempting to do:

titled. fetch() candlestock stock data for apple

proposed approach:

puppeteer web scraper through graphQL with appleData {_, args} ->

    return { data: {data}, webdata: boolean } 

// hardcoded object as edgecase for not scraper returning null which would make webdata: false;

chatGPT

leverage chatGPT API (graphQL resolver | fetch) to retrieve same candlestick data as puppeteer -> in puppeteer functions return data: if puppeteerData.webdata === true // scraper returned valid web data

ask chatGPT thru API which data it thinks is more accurate:

    it's own retrieved data or puppeteer's data.

again but if puppeteer used hardcoded string don't reprompt chatGPT just use AI stock data rather than hard coded string.

(can hedge against with the return data from puppeteer being previously successful return data, & still uses web data for default)

// notes:

preferred sources of info as user input data ? or extend feature & ask puppet|API -> to cite sources?

frankcollins3 commented 3 months ago

npm i candlestick-convert to "batch candlesticks" [11:50am]