Brett Lamy
Brett Lamy
@notwaldorf That is a part of the google's build process. It is also opinionated that iron-component-page is only used inside of google's catalogue (since it has that link to github)....
Right now when I call `prompt.format` I will get back [text which is typed as a string](https://github.com/cfortuner/promptable/blob/0ee47b038dc9f2a2800a2e943be995469c1932f7/packages/promptable/src/prompts/Prompt.ts#L15) then you pass that string to openAI's generate function. I think it would...
Sounds great. I'll keep playing around with things. My opinion may change once I have more context.
@emfastic I'd argue you should be sanitizing your user input before feeding it into a predefined prompt. This approach really shines when you use zod to validate user input. https://stackblitz.com/edit/node-ycgnwj?file=app.ts
> The issue with this @BLamy , is that LLMs like openai are built to allow the user to write any string / text input and return valid text output....
I threw up a PR that uses the example above. https://github.com/cfortuner/promptable/pull/35 I've also found someone [doing something similar](https://github.com/Necmttn/langflow/blob/3bbfd447fbd721b6220a78da8111bd6591c5ce29/packages/prompt/src/index.ts#L5-L18) with recursion. [For Example](https://www.typescriptlang.org/play?#code/KYDwDg9gTgLgBDAnmYcCiIZQIYGMYBq2UAltgEYA2wAzgDwAqcoMwAdgCY1w1YlsBzAHxwAvACg4cJi3Zc4AAwAkAb34AzYFDgAZYOpgBfFStUatcAHLYAtsEMOzbTdoBKJAQAsjCyVLgA-HAqcADaANJw-NKkNgDKYHi0dNZ2QgC6AFw8fIJwhnAAZOiYOPhEpBTU9O5eMCKFfv7+GFh4hMRkVMl6BkJNcNkqhgDc4uKgkLAIyKgMsQlJ9HHMmHLcvKSCIqJwK7Kc3ApwTi5wrrQ+fkHzJPGJuMkXvP1S2ftrh4qnFs9GitcYndFo8apdXoM9mNxEgUKtbGBqGI-K0yh1Kt16AAiAASwEolAgcBsiDgbFsqBI3BM5LsDjg2E4UQA5DZgipsAJ7AVEMBiNwIJQOAA6YmkzwAVxo5EZHCkAHdsNSVBwIPhoA4sUIxkA) I'm also considering using [HOTScript](https://github.com/gvergnaud/HOTScript) instead of ts-toolbox.
This approach really shines when you validate user input with zod. https://stackblitz.com/edit/node-ycgnwj?file=app.ts
Not currently possible to infer a string imported from json as const. https://github.com/microsoft/TypeScript/issues/32063 As a workaround you could probably create a CI pipeline that copies the json file to a...
Been working on an improved API. This is what I've come up with so far. https://blamy.gitbook.io/prompt-builder Demo: https://stackblitz.com/edit/stackblitz-starters-5jzdje?file=src%2FApp.tsx
This is super cool. 👍