Skip to content

Commit

Permalink
fix: make sure $schema field always added (#252) (#281)
Browse files Browse the repository at this point in the history
* fix: make sure $schema field always added

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>
(cherry picked from commit e09abdc)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent f5d4623 commit 82dee55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/routes/text2viz_routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export function registerText2VizRoutes(router: IRouter, assistantService: Assist
delete result.width;
delete result.height;

// make sure $schema field always been added, sometimes, LLM 'forgot' to add this field
result.$schema = 'https://vega.github.io/schema/vega-lite/v5.json';

return res.ok({ body: result });
} catch (e) {
return res.internalError();
Expand Down

0 comments on commit 82dee55

Please sign in to comment.