Created
April 17, 2024 20:27
-
-
Save kevinblanco/c1519015878dfe8bb738a8358d10d57e to your computer and use it in GitHub Desktop.
GeminiAnalizer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
customerSupportMessages: [], | |
async reviewInquiries () { | |
this.customerSupportMessages = SelectQuery.data; | |
for(let i=0; i<this.customerSupportMessages.length; i++){ | |
let gemini = await SupportAnalize.run( | |
{ | |
description: this.customerSupportMessages[i].Description, | |
type: this.customerSupportMessages[i].Type, | |
product: this.customerSupportMessages[i].Product, | |
} | |
) | |
this.customerSupportMessages[i]["recommendation"] = gemini.candidates[0].content.parts[0].text | |
await data_table.setData(this.customerSupportMessages) | |
} | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment