Hi,
Have a problem with the service; I changed common.env with the OpenAI and Pinecone tokens, and everything is running correctly (the front end is up), but when I give bot text, something is not correct.
Also, is it possible to directly access the backend chat and bypass the frontend from the remote server?
Logs:
req.body {
question: 'Hello',
history: [ 'Hello' ],
namespace: 'b16cc0d8-2fd0-4414-bb7a-4f7832de5fed',
mode: 'assistant'
}
{
question: 'Hello',
history: [ 'Hello' ],
namespace: 'b16cc0d8-2fd0-4414-bb7a-4f7832de5fed',
mode: 'assistant'
}
error AxiosError: Request failed with status code 401
at createError (file:///usr/src/app/node_modules/langchain/dist/util/axios-fetch-adapter.js:310:16)
at settle (file:///usr/src/app/node_modules/langchain/dist/util/axios-fetch-adapter.js:25:16)
at file:///usr/src/app/node_modules/langchain/dist/util/axios-fetch-adapter.js:175:19
at new Promise ()
at fetchAdapter (file:///usr/src/app/node_modules/langchain/dist/util/axios-fetch-adapter.js:167:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RetryOperation._fn (/usr/src/app/node_modules/p-retry/index.js:50:12) {
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [AsyncFunction: fetchAdapter],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
validateStatus: [Function: validateStatus],
headers: {
Accept: 'application/json, text/plain, /',
'Content-Type': 'application/json',
'User-Agent': 'OpenAI/NodeJS/3.2.1',
Authorization: 'Bearer MY TOKEN'
},
method: 'post',
data: '{"model":"gpt-3.5-turbo","temperature":0,"top_p":1,"frequency_penalty":0,"presence_penalty":0,"n":1,"stream":false,"messages":[{"role":"user","content":"Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question.\n\nChat History:\nHello\nFollow Up Input: Hello\nStandalone question:"}]}',
url: 'https://api.openai.com/v1/chat/completions'
},
request: Request {
[Symbol(realm)]: { settingsObject: [Object] },
Hi, Have a problem with the service; I changed common.env with the OpenAI and Pinecone tokens, and everything is running correctly (the front end is up), but when I give bot text, something is not correct.
Also, is it possible to directly access the backend chat and bypass the frontend from the remote server?
Logs: req.body { question: 'Hello', history: [ 'Hello' ], namespace: 'b16cc0d8-2fd0-4414-bb7a-4f7832de5fed', mode: 'assistant' } { question: 'Hello', history: [ 'Hello' ], namespace: 'b16cc0d8-2fd0-4414-bb7a-4f7832de5fed', mode: 'assistant' } error AxiosError: Request failed with status code 401 at createError (file:///usr/src/app/node_modules/langchain/dist/util/axios-fetch-adapter.js:310:16) at settle (file:///usr/src/app/node_modules/langchain/dist/util/axios-fetch-adapter.js:25:16) at file:///usr/src/app/node_modules/langchain/dist/util/axios-fetch-adapter.js:175:19 at new Promise ()
at fetchAdapter (file:///usr/src/app/node_modules/langchain/dist/util/axios-fetch-adapter.js:167:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RetryOperation._fn (/usr/src/app/node_modules/p-retry/index.js:50:12) {
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [AsyncFunction: fetchAdapter],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
validateStatus: [Function: validateStatus],
headers: {
Accept: 'application/json, text/plain, /',
'Content-Type': 'application/json',
'User-Agent': 'OpenAI/NodeJS/3.2.1',
Authorization: 'Bearer MY TOKEN'
},
method: 'post',
data: '{"model":"gpt-3.5-turbo","temperature":0,"top_p":1,"frequency_penalty":0,"presence_penalty":0,"n":1,"stream":false,"messages":[{"role":"user","content":"Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question.\n\nChat History:\nHello\nFollow Up Input: Hello\nStandalone question:"}]}',
url: 'https://api.openai.com/v1/chat/completions'
},
request: Request {
[Symbol(realm)]: { settingsObject: [Object] },
}, response: { ok: false, status: 401, statusText: 'Unauthorized', headers: HeadersList { cookies: null,
}, attemptNumber: 7, retriesLeft: 0 }