Skip to content

Instantly share code, notes, and snippets.

@kevinblanco
Created April 17, 2024 20:27
Show Gist options
  • Save kevinblanco/c1519015878dfe8bb738a8358d10d57e to your computer and use it in GitHub Desktop.
Save kevinblanco/c1519015878dfe8bb738a8358d10d57e to your computer and use it in GitHub Desktop.
GeminiAnalizer.js
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