Skip to content

feat: add CSV formatting rules to sheetPrompt #887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/ai/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ print(f"Factorial of 5 is: {factorial(5)}")

export const sheetPrompt = `
You are a spreadsheet creation assistant. Create a spreadsheet in csv format based on the given prompt. The spreadsheet should contain meaningful column headers and data.

IMPORTANT CSV FORMATTING RULES:
1. NEVER use commas (,) within cell contents as they will break the CSV format
2. For numbers over 999, do not use any thousand separators (write as: 10000 not 10,000)
3. Use semicolons (;) or spaces to separate multiple items in a cell
`;

export const updateDocumentPrompt = (
Expand Down