Commit Graph

2157 Commits

Author SHA1 Message Date
Davidson Gomes
7ed1965f57 fix: BusinessId added on create instances in manager 2024-08-03 11:27:19 -03:00
Davidson Gomes
8df38e871a fix: BusinessId added on create instances in manager 2024-08-03 11:27:07 -03:00
Davidson Gomes
385307edc6 chore(readme): update on readme 2024-08-03 10:00:26 -03:00
Davidson Gomes
7ad96f54ca fix: update typebot, openai and dify 2024-08-02 19:42:54 -03:00
Davidson Gomes
671b677569 fix: fetchInstances with clientName parameter 2024-08-02 19:22:44 -03:00
Davidson Gomes
3fa6b1fcc5 fix: get models openai 2024-08-02 10:49:06 -03:00
Davidson Gomes
fd64ea07d0 v2.0.5-rc 2024-08-01 18:01:36 -03:00
Davidson Gomes
359908041b fix: instance screen scroll bar in manager 2024-08-01 18:00:49 -03:00
Davidson Gomes
fc5b8668e6 Merge branch 'v2.0.0' of github.com:EvolutionAPI/evolution-api into v2.0.0 2024-08-01 17:15:40 -03:00
Davidson Gomes
67409e1bf5 Add speech-to-text functionality using OpenAI
This commit introduces a new feature that transcribes audio messages to text using OpenAI's Whisper model. The following files were modified to implement this feature:

- `CHANGELOG.md`: Added a new entry under the 'Features' section to document the speech-to-text functionality.
- `prisma/postgresql-schema.prisma`: Added a new boolean field `speechToText` to the `OpenaiSetting` model.
- `src/api/integrations/openai/dto/openai.dto.ts`: Added a new optional boolean property `speechToText` to the `OpenaiSettingDto` class.
- `src/api/integrations/openai/services/openai.service.ts`: Implemented the `speechToText` method to handle the transcription process.
- `src/api/integrations/openai/validate/openai.schema.ts`: Added a new required boolean schema for the `speechToText` property in the `openaiSettingSchema`.
- `src/api/integrations/typebot/services/typebot.service.ts`: Updated the `audioMessage` property to consider the new `speechToText` field.
- `src/api/services/channels/whatsapp.baileys.service.ts` and `src/api/services/channels/whatsapp.business.service.ts`: Added logic to handle the transcription of audio messages when the `speechToText` setting is enabled.

The purpose of this change is to provide a more accessible way for users to interact with audio messages by converting them to text. This improvement will be particularly useful for users with hearing impairments or those in noisy environments.
2024-08-01 17:15:20 -03:00
Davidson Gomes
b6e90bb037
Merge pull request #725 from oriondesign2015/patch-1
Atualização Stack Evolution API v2
2024-07-31 18:51:04 -03:00
OrionDesign
af5ef4d53c
Update evolution_api_v2.yaml 2024-07-31 18:47:27 -03:00
OrionDesign
b4d01da68d
Update evolution_api_v2.yaml 2024-07-31 18:37:16 -03:00
OrionDesign
9b4f80dfc5
Update evolution_api_v2.yaml 2024-07-30 19:40:42 -03:00
OrionDesign
f09fedb7c0
Atualização Stack Evolution API v2
Adição de algumas environments que imagino que estejam faltando.
2024-07-30 19:39:17 -03:00
Davidson Gomes
a73b74ceaa updates on manager 2024-07-30 18:39:00 -03:00
Davidson Gomes
a49c63bc2b chore: Update CHANGELOG and API routes
Updated CHANGELOG.md with details of the current release.
Modified src/api/routes/index.router.ts to improve the API routing.

These changes are part of the ongoing maintenance and improvement of the project.
2024-07-30 18:38:13 -03:00
Davidson Gomes
8118c68dce v2.0.4-rc 2024-07-30 17:07:45 -03:00
Davidson Gomes
ef2291b9a9 v2.0.4-rc 2024-07-30 15:39:00 -03:00
Davidson Gomes
bb65b566e5 chore: Update dify and openai services
Modified the implementation of Dify and OpenAI services to improve overall functionality. These changes aim to enhance the stability and performance of the integration layer, although no new features have been added.

Changes affected the following files:
- dify.service.ts
- openai.service.ts
2024-07-30 15:38:27 -03:00
Davidson Gomes
881c1c2aa6 v2.0.4-rc 2024-07-30 14:52:19 -03:00
Davidson Gomes
fcb9dd29f3 v2.0.4-rc 2024-07-30 14:14:17 -03:00
Davidson Gomes
7cd0d2430d feat: update new manager for dify 2024-07-30 14:12:46 -03:00
Davidson Gomes
35016087d6 changelog 2024-07-30 13:35:31 -03:00
Davidson Gomes
a5d72a0dfd feat: Integration with Dify
Adds support for Dify integration, including new routes, services, and controllers. The configuration for Dify has been added to the environment file, and the necessary changes have been made to the `.env.example` file. Additionally, the WhatsApp Baileys service has been updated to handle Dify notifications.

Modified files:
- `.env.example`
- `package.json`
- `src/api/integrations/openai/services/openai.service.ts`
- `src/api/routes/index.router.ts`
- `src/api/server.module.ts`
- `src/api/services/channel.service.ts`
- `src/api/services/channels/whatsapp.baileys.service.ts`
- `src/config/env.config.ts`
- `src/validate/validate.schema.ts`

Introduced files:
- `src/api/integrations/dify/`
- `src/api/integrations/dify/controllers/dify.controller.ts`
- `src/api/integrations/dify/dto/dify.dto.ts`
- `src/api/integrations/dify/routes/dify.router.ts`
- `src/api/integrations/dify/services/dify.service.ts`
- `src/api/integrations/dify/validate/dify.schema.ts`
2024-07-30 13:34:35 -03:00
Davidson Gomes
b604e4ecc7 feat: Introduce dify tables with related migrations
This commit introduces a new feature, dify tables, along with related migration scripts. The `prisma/migrations/20240730152156_create_dify_tables/migration.sql` file contains the migration for creating the dify tables, while the `prisma/postgresql-schema.prisma` file has been modified to include the necessary schema changes for these tables. This change improves data organization and simplifies data management for the project.
2024-07-30 12:22:39 -03:00
Davidson Gomes
66814b403e chore: Update monitor service and instance controller
Refactored the instance controller and monitor service to improve the connection handling and management of WhatsApp instances.

- Modified the instance controller to close the WebSocket connection and restart the instance instead of reloading it.
- Updated the monitor service to remove the instance from the `waInstances` object and emit an event to clean up and remove the instance data.
- Fixed an issue where the instance was not being removed from the `waInstances` object.

Files affected:
- CHANGELOG.md
- src/api/controllers/instance.controller.ts
- src/api/services/monitor.service.ts
2024-07-30 11:15:21 -03:00
Davidson Gomes
95bc5e6b21 chore: Updated dependencies and added new manager
In this commit, the following changes were made:

- Updated the version of the project to 2.0.4-beta.
- Added the new manager with version 2.0.0.
- Updated the Baileys version.
- Modified several files such as CHANGELOG.md, Dockerfile, package.json, src/api/routes/index.router.ts, and src/api/routes/view.router.ts.
- Deleted the views/manager.hbs file and added the manager/ folder.

These changes update the dependencies and include a new manager, which may impact the application's functionality.
2024-07-30 09:17:49 -03:00
Davidson Gomes
5047e6281a fix: Correct openai session deletion and pause functionality
This commit fixes an issue where openai sessions were not being properly deleted or paused. It updates the `openai.service.ts` and `openai.schema.ts` files to correctly handle session deletion and pausing.

The `openai.service.ts` file now includes additional checks for session status before deleting or updating. The `openai.schema.ts` file has been updated to include a new 'delete' status option.

These changes ensure that openai sessions are properly managed and that the bot can be paused and resumed as intended. This improves the overall functionality and user experience of the application.
2024-07-29 19:07:26 -03:00
Davidson Gomes
7ba1f2fdf4 fix: Correct pause and listen to my messages from Typebot integration
This commit fixes an issue where the bot was not pausing and listening to my messages from the Typebot integration. The changes include modifying the Typebot service, Typebot schema, and WhatsApp Baileys and Business services to properly handle the pause and message listening functionality. The affected files are typebot.service.ts, typebot.schema.ts, and both WhatsApp services.

The specific modifications include adding a new 'delete' status option in the Typebot schema, updating the Typebot service to handle the 'delete' status, and adjusting the WhatsApp services to properly send Typebot messages based on the new schema. This ensures that the bot can pause and listen to messages from Typebot integration, providing a better user experience.
2024-07-29 17:53:18 -03:00
Davidson Gomes
21375bcb4d changelog 2024-07-29 17:30:26 -03:00
Davidson Gomes
7bfb4f93bb Fix: Corrected openai trigger validation
Corrected an issue in the validation of openai triggers by changing the 'findFirst' method to 'findMany' and implementing a loop to find the correct trigger match. This change improves the accuracy of trigger validation and ensures that all possible matches are considered.

Impact: This fix ensures that the correct trigger is identified, improving the overall functionality of the openai integration.

Affected files:
- openai.service.ts
2024-07-29 17:29:55 -03:00
Davidson Gomes
c03e0cc954 fix: corrected typebot trigger validation
Explanation:
This commit fixes an issue in the validation of typebot triggers. The 'findFirst' method was used to search for triggers, but it only returns the first match found. To solve this problem, the 'findMany' method was used instead, and a loop was added to search for all matches. This change ensures that all triggers that match the validation criteria are returned.

The modified file is:
- typebot.service.ts: this is the main file where the changes were made. It was necessary to modify the function that validates the triggers, replacing the 'findFirst' method with the 'findMany' method and adding a loop to search for all matches.

This change improves the validation of typebot triggers, ensuring that all matches are returned, and prevents errors in the trigger validation process.
2024-07-29 17:29:18 -03:00
Davidson Gomes
b3b1fb30c7 fix: adjusts for new manager 2024-07-29 15:10:04 -03:00
Davidson Gomes
2a7f9698d2 fix: adjusts for new manager 2024-07-29 15:09:40 -03:00
Davidson Gomes
089810fb55 fix: Update Baileys version in package.json and CHANGELOG.md
This commit updates the Baileys version from 'github:EvolutionAPI/Baileys' to '6.7.5' in the package.json file. Additionally, it includes an update to the CHANGELOG.md file, adding a new section for version 2.0.4-beta with a fixed issue related to Baileys. This change improves the stability and compatibility of the project with the latest Baileys version.
2024-07-29 09:34:29 -03:00
Davidson Gomes
24866834e9 version 2024-07-29 09:03:37 -03:00
Davidson Gomes
c3bb632a1a fix: Fixed Typebot start call with active session by updating instanceId references in TypebotService
In this commit, I fixed an issue with the start call of Typebot when there is an active session. I noticed that there were inconsistencies in the way the instanceId was being referenced in the TypebotService.

To resolve this, I modified the TypebotService to update the instanceId references to the correct format. Specifically, I changed the following files:
- CHANGELOG.md: added a note about the fix for the Typebot start call with active session
- src/api/integrations/typebot/services/typebot.service.ts: updated the instanceId references in the startTypebot, createNewSession, and other related methods.

This change ensures that the Typebot start call with active session works as intended, improving the overall functionality of the Typebot integration.
2024-07-29 09:02:51 -03:00
Davidson Gomes
bda0f6a198 changelog 2024-07-29 08:53:42 -03:00
Davidson Gomes
d00e3677f5 chore: adjust TriggerType for OpenAI and Typebot integrations
Modifies the TriggerType enum to include a 'none' option and updates the OpenAI and Typebot services to handle this new option. Additionally, the services now require a trigger operator and value when the trigger type is set to 'keyword'.

Modified files:
- prisma/postgresql-schema.prisma
- src/api/integrations/openai/services/openai.service.ts
- src/api/integrations/typebot/services/typebot.service.ts

Untracked file:
- prisma/migrations/20240729115127_modify_trigger_type_openai_typebot_table/
2024-07-29 08:53:15 -03:00
Davidson Gomes
f95d34a1da chore: Update WhatsApp Business service to stop processing read messages from non-broadcast and non-me jids
Modifies the WhatsApp Business service to skip processing read messages from non-broadcast and non-me jids, improving performance and reducing unnecessary computations. Affects src/api/services/channels/whatsapp.business.service.ts.
2024-07-28 19:54:45 -03:00
Davidson Gomes
0bb2b92853 feat: Sending template approval status webhook 2024-07-25 19:38:34 -03:00
Davidson Gomes
31cb83a40c chore: Update changelog with new webhook feature and bug fix
- Add new section "Features" with webhook url by submitted template
- Equations and adjustments for the new manager under "Fixed" section
- CHANGELOG.md modified
2024-07-23 17:14:26 -03:00
Davidson Gomes
4746d3991e chore: Add webhookUrl to Message model, DTOs, and services
Adds webhookUrl field to Message model, SendMessageDto, SendTemplateDto, SendContactDto, and related services to enable sending messages to a specified webhook URL. This change allows for more flexible message handling and delivery options.

Modified files:
- prisma/postgresql-schema.prisma
- src/api/dto/sendMessage.dto.ts
- src/api/services/channels/whatsapp.business.service.ts
- src/validate/message.schema.ts

Untracked files:
- prisma/migrations/20240723200254_add_webhookurl_on_message/
2024-07-23 17:13:37 -03:00
Davidson Gomes
50591e9ed6 chore: Update package version and changelog
Bumped package version from 2.0.2-beta to 2.0.3-beta to reflect recent changes.
Updated the changelog accordingly. The modification was made in the package.json file.
This change is a preparation for the next release and does not introduce new features or bug fixes.
2024-07-23 12:35:56 -03:00
Davidson Gomes
388a4f7630 chore: Update changelog
Update the CHANGELOG.md file to reflect the recent changes in the project. This commit includes the addition and modification of the changelog to keep track of the updates made in the v2.0.0 branch.
2024-07-23 12:35:36 -03:00
Davidson Gomes
c1d3209f2f chore: equations and adjustments for the new manager 2024-07-23 12:34:58 -03:00
Davidson Gomes
837f7f310a fix(CHANGELOG.md): Update version 2.0.2-beta release date and remove assistant details
This commit updates the release date of version 2.0.2-beta in the CHANGELOG.md file and removes the detailed description of Open AI assistants implementation, as it is not necessary for this section. The main purpose of this commit is to keep the CHANGELOG.md file clean and concise, only mentioning the high-level changes and updates.

Note that the focus of this commit is on the CHANGELOG.md file, which is a crucial file for tracking the project's versioning and changes over time. By providing a clear and concise commit message, other developers can easily understand the purpose of this change and its impact on the project's versioning and documentation.
2024-07-18 21:34:02 -03:00
Davidson Gomes
f8e303f3a3 fix: Implement open chat completion and refactor code
Remove unnecessary initialization of empty arrays for systemMessages, assistantMessages, and userMessages in OpenaiService.
Also, implement a function to handle open chat completion and refactor the code for better readability and maintainability.
Affected files: openai.service.ts
2024-07-18 21:33:21 -03:00
Davidson Gomes
51749e8712 feat: Open AI assistants implemented 2024-07-18 21:11:46 -03:00