Update app.js
Browse files
app.js
CHANGED
|
@@ -12,7 +12,7 @@ const NOTDIAMOND_URL = 'https://chat.notdiamond.ai/mini-chat';
|
|
| 12 |
const NOTDIAMOND_HEADERS = {
|
| 13 |
'Content-Type': 'application/json',
|
| 14 |
'accept': '*/*',
|
| 15 |
-
'next-action':
|
| 16 |
'accept-language': 'en,en-US;q=0.9',
|
| 17 |
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36'
|
| 18 |
};
|
|
@@ -51,7 +51,7 @@ function createOpenAIChunk(content, model, finishReason = null) {
|
|
| 51 |
object: "chat.completion.chunk",
|
| 52 |
created: Math.floor(Date.now() / 1000),
|
| 53 |
model: model,
|
| 54 |
-
system_fingerprint:
|
| 55 |
choices: [
|
| 56 |
{
|
| 57 |
index: 0,
|
|
@@ -195,7 +195,7 @@ app.post('/ai/v1/chat/completions', async (req, res) => {
|
|
| 195 |
const headers = {
|
| 196 |
'Content-Type': 'application/json',
|
| 197 |
'accept': '*/*',
|
| 198 |
-
'next-action':
|
| 199 |
'accept-language': 'en,en-US;q=0.9',
|
| 200 |
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36',
|
| 201 |
};
|
|
@@ -233,7 +233,7 @@ app.post('/ai/v1/chat/completions', async (req, res) => {
|
|
| 233 |
object: "chat.completion",
|
| 234 |
created: Math.floor(Date.now() / 1000),
|
| 235 |
model: userModel,
|
| 236 |
-
system_fingerprint:
|
| 237 |
choices: [
|
| 238 |
{
|
| 239 |
index: 0,
|
|
|
|
| 12 |
const NOTDIAMOND_HEADERS = {
|
| 13 |
'Content-Type': 'application/json',
|
| 14 |
'accept': '*/*',
|
| 15 |
+
'next-action': `${next_action}`,
|
| 16 |
'accept-language': 'en,en-US;q=0.9',
|
| 17 |
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36'
|
| 18 |
};
|
|
|
|
| 51 |
object: "chat.completion.chunk",
|
| 52 |
created: Math.floor(Date.now() / 1000),
|
| 53 |
model: model,
|
| 54 |
+
system_fingerprint: systemFingerprint,
|
| 55 |
choices: [
|
| 56 |
{
|
| 57 |
index: 0,
|
|
|
|
| 195 |
const headers = {
|
| 196 |
'Content-Type': 'application/json',
|
| 197 |
'accept': '*/*',
|
| 198 |
+
'next-action': `${next_action}`,
|
| 199 |
'accept-language': 'en,en-US;q=0.9',
|
| 200 |
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36',
|
| 201 |
};
|
|
|
|
| 233 |
object: "chat.completion",
|
| 234 |
created: Math.floor(Date.now() / 1000),
|
| 235 |
model: userModel,
|
| 236 |
+
system_fingerprint: systemFingerprint,
|
| 237 |
choices: [
|
| 238 |
{
|
| 239 |
index: 0,
|