Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: Instruct model to rewrite text when necessary (#2487)

Giuseppecf6a1f8e3e41
diff --git a/packages/ai/src/chains/copywriter/__generated__/copy.system.prompt.ts b/packages/ai/src/chains/copywriter/__generated__/copy.system.prompt.ts
index 2162224e6f..688d64f57a 100644
--- a/packages/ai/src/chains/copywriter/__generated__/copy.system.prompt.ts
+++ b/packages/ai/src/chains/copywriter/__generated__/copy.system.prompt.ts
@@ -1,6 +1,6 @@
export const prompt = `You are a copywriter AI and your task is to produce an array of copy completions for a web page section.
-The user will provide a description and a list of copy snippets that you should generate text for.
+The user will provide a list of copy snippets to edit and an edit request. You must fulfill the edit request ignoring the current text value if necessary.
The copy must pop, be unique and in line with the user request, so do not generate generic lorem ipsum text nor use generic names. Unless explicitly specified usually the new text length should have similar length of the existing one.
diff --git a/packages/ai/src/chains/copywriter/__generated__/copy.user.prompt.ts b/packages/ai/src/chains/copywriter/__generated__/copy.user.prompt.ts
index f69534af54..6762405d25 100644
--- a/packages/ai/src/chains/copywriter/__generated__/copy.user.prompt.ts
+++ b/packages/ai/src/chains/copywriter/__generated__/copy.user.prompt.ts
@@ -1,12 +1,12 @@
-export const prompt = `Description:
+export const prompt = `List of all the copy snippets to edit:
\`\`\`
-{prompt}
+{text_nodes}
\`\`\`
-List of copy to complete:
+Edit request:
\`\`\`
-{text_nodes}
+{prompt}
\`\`\`
`;
diff --git a/packages/ai/src/chains/copywriter/copy.system.prompt.md b/packages/ai/src/chains/copywriter/copy.system.prompt.md
index 807c05f6f0..420a60b1bc 100644
--- a/packages/ai/src/chains/copywriter/copy.system.prompt.md
+++ b/packages/ai/src/chains/copywriter/copy.system.prompt.md
@@ -1,6 +1,6 @@
You are a copywriter AI and your task is to produce an array of copy completions for a web page section.
-The user will provide a description and a list of copy snippets that you should generate text for.
+The user will provide a list of copy snippets to edit and an edit request. You must fulfill the edit request ignoring the current text value if necessary.
The copy must pop, be unique and in line with the user request, so do not generate generic lorem ipsum text nor use generic names. Unless explicitly specified usually the new text length should have similar length of the existing one.
diff --git a/packages/ai/src/chains/copywriter/copy.user.prompt.md b/packages/ai/src/chains/copywriter/copy.user.prompt.md
index 2b8a3e4ae3..c9144ad58a 100644
--- a/packages/ai/src/chains/copywriter/copy.user.prompt.md
+++ b/packages/ai/src/chains/copywriter/copy.user.prompt.md
@@ -1,11 +1,11 @@
-Description:
+List of all the copy snippets to edit:
```
-{prompt}
+{text_nodes}
```
-List of copy to complete:
+Edit request:
```
-{text_nodes}
+{prompt}
```