Commit 8fbf646 1 parent 3a9c681 commit 8fbf646 Copy full SHA for 8fbf646
File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -61,5 +61,5 @@ function analyzeAndLabelEmailSentiment() {
61
61
* @returns {boolean } True if the sentiment is negative, false otherwise.
62
62
*/
63
63
function isNegativeSentiment ( text ) {
64
- return processSentiment ( text ) ;
64
+ return processSentiment ( text ) === 'negative' ;
65
65
}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
14
14
limitations under the License.
15
15
*/
16
16
17
- const PROJECT_ID = 'qwiklabs-gcp-01-e6ca251b4715 ' ;
17
+ const PROJECT_ID = '[ADD YOUR GCP PROJECT ID HERE] ' ;
18
18
const VERTEX_AI_LOCATION = 'us-central1' ;
19
19
const MODEL_ID = 'gemini-1.5-pro-002' ;
20
20
@@ -74,5 +74,5 @@ function processSentiment(emailText) {
74
74
const payload = JSON . parse ( response . getContentText ( ) ) ;
75
75
const text = JSON . parse ( payload . candidates [ 0 ] . content . parts [ 0 ] . text ) ;
76
76
77
- return text . response === 'negative' ;
77
+ return text . response ;
78
78
}
You can’t perform that action at this time.
0 commit comments