Skip to content

Commit

Permalink
fix: Ensure AI doesn't return json markdown (#3809)
Browse files Browse the repository at this point in the history
## Description

Detect route started returning json in markdown instead of pure json
`json\n[\"generate-template-prompt\"]\n`

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
  • Loading branch information
kof authored Jul 28, 2024
1 parent d7531b7 commit e0552f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ Avaliable tasks are provided below as an object with task_name:task_description
The task description can help you infer the task name to pick. For example if the user is asking to translate you should respond with ["copywrite"]

Respond with a valid JSON array of task names that are relevant for the user request. Start with [

Do not start your response with ```json

0 comments on commit e0552f0

Please sign in to comment.