yasir
commited on
Update script.js
Browse files
script.js
CHANGED
|
@@ -102,7 +102,12 @@ body: JSON.stringify(data)
|
|
| 102 |
})
|
| 103 |
.then(response => response.json())
|
| 104 |
.then(data =>{
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
fullPrompt=data.result
|
|
|
|
| 106 |
})
|
| 107 |
.catch((error) => {
|
| 108 |
console.error('Error:', error);
|
|
|
|
| 102 |
})
|
| 103 |
.then(response => response.json())
|
| 104 |
.then(data =>{
|
| 105 |
+
if(data.result == null){
|
| 106 |
+
fullPrompt=inp.value+prompt
|
| 107 |
+
}
|
| 108 |
+
else{
|
| 109 |
fullPrompt=data.result
|
| 110 |
+
}
|
| 111 |
})
|
| 112 |
.catch((error) => {
|
| 113 |
console.error('Error:', error);
|