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 fetch = require('node-fetch');
|
||||
|
||||
let fetch;
|
||||
// let fetch;
|
||||
|
||||
async function loadFetch() {
|
||||
if (!fetch) {
|
||||
fetch = (await import('node-fetch')).default;
|
||||
}
|
||||
}
|
||||
// async function loadFetch() {
|
||||
// if (!fetch) {
|
||||
// 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
|
||||
async function fetchContentFromURL(url) {
|
||||
|
|
Ładowanie…
Reference in New Issue