fix(spark-analytics): replace multiline JS template literals with concatenation
Multi-line template literals spanning unindented continuation lines break the YAML block scalar indentation, causing kustomize to fail with MalformedYAMLError. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -188,19 +188,17 @@ data:
|
|||||||
row.map((v, j) => dataset.headers[j] + ': ' + v).join(', ')
|
row.map((v, j) => dataset.headers[j] + ': ' + v).join(', ')
|
||||||
).join('\\n');
|
).join('\\n');
|
||||||
|
|
||||||
const systemPrompt = `You are a chess analytics expert. Explain what this dataset shows to a chess player.
|
const systemPrompt = 'You are a chess analytics expert. Explain what this dataset shows to a chess player. '
|
||||||
Be concise but insightful — 3-6 sentences. Focus on what the data reveals about chess patterns,
|
+ 'Be concise but insightful — 3-6 sentences. Focus on what the data reveals about chess patterns, '
|
||||||
player behaviour, or game dynamics. When column names reference chess openings (ECO codes, opening names),
|
+ 'player behaviour, or game dynamics. When column names reference chess openings (ECO codes, opening names), '
|
||||||
explain what those openings are.`;
|
+ 'explain what those openings are.';
|
||||||
|
|
||||||
const userPrompt = `Dataset: "${dataset.label}"
|
const userPrompt = 'Dataset: "' + dataset.label + '"\n'
|
||||||
Total rows: ${dataset.total_rows}
|
+ 'Total rows: ' + dataset.total_rows + '\n'
|
||||||
Columns: ${dataset.headers.join(', ')}
|
+ 'Columns: ' + dataset.headers.join(', ') + '\n\n'
|
||||||
|
+ 'Sample data (first ' + dataset.sample.length + ' rows):\n'
|
||||||
Sample data (first ${dataset.sample.length} rows):
|
+ sampleText + '\n\n'
|
||||||
${sampleText}
|
+ 'What does this dataset tell us about chess?';
|
||||||
|
|
||||||
What does this dataset tell us about chess?`;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const resp = await fetch(NIM_ENDPOINT, {
|
const resp = await fetch(NIM_ENDPOINT, {
|
||||||
|
|||||||
Reference in New Issue
Block a user