Skip to content

Instantly share code, notes, and snippets.

@thangman22
Last active February 26, 2024 10:45
Show Gist options
  • Save thangman22/a1a32b8787079523aaf344d45b041a8a to your computer and use it in GitHub Desktop.
Save thangman22/a1a32b8787079523aaf344d45b041a8a to your computer and use it in GitHub Desktop.
const model = genAI.getGenerativeModel({ model: "gemini-pro" });
const prompt = `This is an article or news from website ${request.body.url}. Please summary to ${paragraph} paragraph in the ${language} lanaguage. This is full article ${plainContent}`;
const result = await model.generateContent([prompt]);
console.log(result.response.text());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment