-
Notifications
You must be signed in to change notification settings - Fork 0
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
New API Endpoints #105
Conversation
New API Endpoints
Added html decode for note content response
Code Review Changes
There was a problem hiding this 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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 " |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
New Features and Enhancements:
@coderabbitai: ignore