kopia lustrzana https://github.com/learn-awesome/learndb
changed the structure of the imports
rodzic
5478b7709f
commit
801cabdce9
|
@ -3,13 +3,14 @@
|
||||||
const { Configuration, OpenAIApi } = require('openai');
|
const { Configuration, OpenAIApi } = require('openai');
|
||||||
// const fetch = require('node-fetch');
|
// const fetch = require('node-fetch');
|
||||||
|
|
||||||
let fetch;
|
// let fetch;
|
||||||
|
|
||||||
async function loadFetch() {
|
// async function loadFetch() {
|
||||||
if (!fetch) {
|
// if (!fetch) {
|
||||||
fetch = (await import('node-fetch')).default;
|
// fetch = (await import('node-fetch')).default;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));
|
||||||
|
|
||||||
// Function to fetch content from URL using a web scraping service
|
// Function to fetch content from URL using a web scraping service
|
||||||
async function fetchContentFromURL(url) {
|
async function fetchContentFromURL(url) {
|
||||||
|
|
Ładowanie…
Reference in New Issue