Spaces:
Sleeping
Sleeping
Update application/static/js/components/initialize.js
Browse files
application/static/js/components/initialize.js
CHANGED
@@ -42,8 +42,8 @@ class Initialize {
|
|
42 |
try {
|
43 |
const response = await requests.request('POST', '/fetch', { "Content-Type": "application/json" }, JSON.stringify({ "convId": id }), false);
|
44 |
if (!response.ok) {
|
45 |
-
const errorText = await response.text();
|
46 |
-
console.error(`Error fetching conversation: ${response.status}
|
47 |
return; // Early return on error
|
48 |
}
|
49 |
const data = await response.json();
|
@@ -70,8 +70,8 @@ class Initialize {
|
|
70 |
try {
|
71 |
const response = await requests.request('GET', '/convs', { "Content-Type": "application/json" }, null, false);
|
72 |
if (!response.ok) {
|
73 |
-
const errorText = await response.text();
|
74 |
-
console.error(`Error fetching conversations: ${response.status}
|
75 |
return; // Early return on error
|
76 |
|
77 |
}
|
@@ -102,8 +102,8 @@ class Initialize {
|
|
102 |
try {
|
103 |
const response = await requests.request('GET', '/models', { "Content-Type": "application/json" }, null, false);
|
104 |
if (!response.ok) {
|
105 |
-
const errorText = await response.text();
|
106 |
-
console.error(`Error fetching models: ${response.status}
|
107 |
return; // Early return on error
|
108 |
}
|
109 |
const data = await response.json();
|
|
|
42 |
try {
|
43 |
const response = await requests.request('POST', '/fetch', { "Content-Type": "application/json" }, JSON.stringify({ "convId": id }), false);
|
44 |
if (!response.ok) {
|
45 |
+
// const errorText = await response.text(); // REMOVED - rely on request.js
|
46 |
+
console.error(`Error fetching conversation: ${response.status}`); // Simplified
|
47 |
return; // Early return on error
|
48 |
}
|
49 |
const data = await response.json();
|
|
|
70 |
try {
|
71 |
const response = await requests.request('GET', '/convs', { "Content-Type": "application/json" }, null, false);
|
72 |
if (!response.ok) {
|
73 |
+
//const errorText = await response.text(); // REMOVED - rely on request.js
|
74 |
+
console.error(`Error fetching conversations: ${response.status}`); // Simplified
|
75 |
return; // Early return on error
|
76 |
|
77 |
}
|
|
|
102 |
try {
|
103 |
const response = await requests.request('GET', '/models', { "Content-Type": "application/json" }, null, false);
|
104 |
if (!response.ok) {
|
105 |
+
//const errorText = await response.text(); // REMOVED - rely on request.js
|
106 |
+
console.error(`Error fetching models: ${response.status}`); // Simplified
|
107 |
return; // Early return on error
|
108 |
}
|
109 |
const data = await response.json();
|