Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New API Endpoints #105

Merged
merged 42 commits into from
Nov 9, 2023
Merged

New API Endpoints #105

merged 42 commits into from
Nov 9, 2023

Conversation

Raj-Shah1
Copy link
Contributor

New Features and Enhancements:

  • API - Edit Note Endpoint #18
  • API - Get a list of Events in an account #29
  • API - Create Event for an Account #30
  • API - Edit Event in an Account Endpoint #31
  • API - Delete Event in an Account Endpoint #32
  • API - Edit Task in an Account Endpoint #36
  • API - Get Event By Id Endpoint #101
  • API - Get Task By Id Endpoint #102
  • Add Event Suggestion Prompt #103

@coderabbitai: ignore

Added html decode for note content response
Copy link
Member

@AMAN-BARBARIA AMAN-BARBARIA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review comments added

String noteContent = note.getText();
String noteTitle = getNoteTitleFromContent(noteContent);
noteContent = util.replaceNewLineWithBreak(noteContent);
String unEscapeNoteContent = Util.unEscapeSpecialCharactersForPlainText(noteContent);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is purpose of unescaping special characters?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was already there in getNoteTitleFromContent method, I just moved that logic here and changed into two parts unEscapeSpecialCharactersForPlainText and getTrimmedString.

+ " \"role\": \"system\",\n"
+ " \"content\": \"You are an AI assistant that provides suggestions for creating tasks in CRM based solely on the content of the input message. The content of task if any found should only be from input message. If no task suggestions are found in the input message, return empty data. If task suggestions are found, they should include description and due date. Due Date format should be YYYY-MM-DD. Today's date is "
+ " \"content\": \"You are an AI assistant that provides suggestions for creating tasks and events in CRM based solely on the content of the input message. The content of the task or event, if any found, should only be from the input message. If no task or event suggestions are found in the input message, return empty data. Suggestions can either be both task and event list or only tasks or only events or empty. If task suggestions are found, they should include description and due date. Due Date format should be YYYY-MM-DD. If event suggestions are found, they should include description and start datetime and end datetime. If end datetime not provided it should be start datetime + 1 hour. Start datetime and end datetime format is yyyy-MM-dd'T'HH:mm:ss.SSS+0000. Today's date is "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If end datetime not provided it should be start datetime + 1 hour.
Should this be done programatically? What is the success rate of GPT for such cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Till now, it is giving almost 100% success rate, And yes we can move that to be done programatically, that will also save some token data, will add it as changes for new spring

"end_datetime": "2023-07-22T13:12:17.000+0000"
},
"accountId": "0011e00000bWSxdAAG",
"eventId":"0691e000001X1yTAAS"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be test cases for start_datetime & end_datetime?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

"due_date":"2023-12-01"
},
"accountId": "0011e00000bWSxdAAG",
"taskId":"0691e000001X1yTAAS"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Test Cases for description/due date/crm_organization_user_id

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Copy link
Member

@AMAN-BARBARIA AMAN-BARBARIA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Raj-Shah1 Raj-Shah1 merged commit d548b06 into master Nov 9, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants