diff --git a/index.html b/index.html index 503e1c4..db3d537 100644 --- a/index.html +++ b/index.html @@ -15,6 +15,7 @@ + @@ -24,6 +25,15 @@

ChatVenture

Hello PLAYER! Welcome to the text adventure game where the story is made up by GPT :)

+ + + +
diff --git a/main.js b/main.js index 67b0f50..f2816c1 100644 --- a/main.js +++ b/main.js @@ -1,8 +1,93 @@ +const chatGptMessages = []; + +const makeRequest = async (url, data) => { + const response = await fetch(url, { + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${_CONFIG_.API_KEY}`, + // Our _CONFIG data is imported in the HTML file using the