chore: adjusting details

This commit is contained in:
Davidson Gomes 2024-08-09 06:53:43 -03:00
parent fa05cf85ab
commit 9367be0fb1
4 changed files with 3 additions and 10 deletions

View File

@ -1209,7 +1209,6 @@ export class DifyService {
responseType: 'stream', responseType: 'stream',
}); });
let completeMessage = '';
let conversationId; let conversationId;
const stream = response.data; const stream = response.data;
@ -1221,10 +1220,7 @@ export class DifyService {
try { try {
const event = JSON.parse(data); const event = JSON.parse(data);
if (event.event === 'agent_message') { if (event.event === 'agent_message') {
completeMessage += event.answer;
conversationId = conversationId ?? event?.conversation_id; conversationId = conversationId ?? event?.conversation_id;
console.log('completeMessage:', completeMessage);
} }
} catch (error) { } catch (error) {
console.error('Error parsing stream data:', error); console.error('Error parsing stream data:', error);

View File

@ -12,7 +12,6 @@ export class RabbitmqRouter extends RouterBroker {
super(); super();
this.router this.router
.post(this.routerPath('set'), ...guards, async (req, res) => { .post(this.routerPath('set'), ...guards, async (req, res) => {
console.log('RabbitmqRouter -> constructor -> req', req.body);
const response = await this.dataValidate<RabbitmqDto>({ const response = await this.dataValidate<RabbitmqDto>({
request: req, request: req,
schema: rabbitmqSchema, schema: rabbitmqSchema,

View File

@ -50,7 +50,8 @@ const createBucket = async () => {
logger.info(`S3 Bucket ${bucketName} - ON`); logger.info(`S3 Bucket ${bucketName} - ON`);
return true; return true;
} catch (error) { } catch (error) {
console.log('S3 ERROR: ', error); logger.error('S3 ERROR:');
logger.error(error);
return false; return false;
} }
} }
@ -65,7 +66,7 @@ const uploadFile = async (fileName: string, file: Buffer | Transform | Readable,
metadata['custom-header-application'] = 'evolution-api'; metadata['custom-header-application'] = 'evolution-api';
return await minioClient.putObject(bucketName, objectName, file, size, metadata); return await minioClient.putObject(bucketName, objectName, file, size, metadata);
} catch (error) { } catch (error) {
console.log('ERROR: ', error); logger.error(error);
return error; return error;
} }
} }

View File

@ -13,9 +13,6 @@ export class ViewsRouter extends RouterBroker {
const basePath = path.join(process.cwd(), 'manager', 'dist'); const basePath = path.join(process.cwd(), 'manager', 'dist');
const indexPath = path.join(basePath, 'index.html'); const indexPath = path.join(basePath, 'index.html');
console.log('Base path:', basePath);
console.log('Index path:', indexPath);
this.router.use(express.static(basePath)); this.router.use(express.static(basePath));
this.router.get('*', (req, res) => { this.router.get('*', (req, res) => {