better name for session ID where needed and better formatting
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
const axios = require('axios');
|
||||
const jsonfile = require('jsonfile');
|
||||
let session2;
|
||||
let sessionID;
|
||||
|
||||
function parseQuestionsAndAnswers(jsonStr) {
|
||||
const obj = JSON.parse(jsonStr);
|
||||
@ -19,9 +19,9 @@ module.exports = {
|
||||
|
||||
if (err) return interaction.editReply('Please create a session using /create-session.');
|
||||
|
||||
session2 = session.id;
|
||||
sessionID = session.id;
|
||||
|
||||
if (!session2) {
|
||||
if (!sessionID) {
|
||||
console.log("No Session!");
|
||||
isProcessing = false;
|
||||
return;
|
||||
@ -30,7 +30,7 @@ module.exports = {
|
||||
'authority': process.env.PUBLIC_URL,
|
||||
'accept': 'text/event-stream',
|
||||
};
|
||||
const response = await axios.get(`http://${process.env.INTERNAL_IP}:8008/api/chat/` + session2, {
|
||||
const response = await axios.get(`http://${process.env.INTERNAL_IP}:8008/api/chat/${sessionID}`, {
|
||||
headers,
|
||||
auth: {
|
||||
username: process.env.USERNAME,
|
||||
|
Reference in New Issue
Block a user