Skip to content

Commit

Permalink
Simplify generateText call
Browse files Browse the repository at this point in the history
  • Loading branch information
mslinnea committed Nov 14, 2024
1 parent 62afd23 commit 720a8f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
9 changes: 1 addition & 8 deletions src/components/metaDescription/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,7 @@ function MetaDescriptionField() {
let candidates;
try {
candidates = await service.generateText(
{
role: 'user',
parts: [
{
text: generatePrompt({ postTitle, postContent }),
},
],
},
generatePrompt({ postTitle, postContent }),
{
feature: 'add-meta-description-plugin',
capabilities: ['text_generation'],
Expand Down
9 changes: 1 addition & 8 deletions src/components/metaKeywords/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,7 @@ function MetaKeywordsField() {
let candidates;
try {
candidates = await service.generateText(
{
role: 'user',
parts: [
{
text: generateKeywordsPrompt({ postTitle, postContent }),
},
],
},
generateKeywordsPrompt({ postTitle, postContent }),
{
feature: 'add-meta-keywords-plugin',
capabilities: ['text_generation'],
Expand Down

0 comments on commit 720a8f4

Please sign in to comment.