I tried using the programmable button to run a summarize action, but the code snippet is a bit broken in the following places:
- The content quotes "Your task is to" need to start with a back tick `, not a double quote "
- The same content end quote is a "' when it should be a back tick ` (after Blueprint)
- The part
${text}
does not need any quoting, just replace it with a plain: text (this is surrounded by two back ticks, I can't get it to display properly in the post)
- The decoder.decode with split has two single quotes each on separate line, these single quotes ' need to be replaced by a back tick `
The JavaScript code template for Summarize should be working, as long as you provide OpenAI token, user shouldn't have to modify any other lines.
By applying the above changes and appropriate OpenAI token, the code starts working.
I hope the quotes will appear correctly in here.
0.99.127.2-beta (WebKit 619.1.1), macOS 14.0
Sonoma (14)