fixie-ai / ai-jsx

The AI Application Framework for Javascript
https://docs.ai-jsx.com
MIT License
1.05k stars 78 forks source link

Improve prompt/completion logging #506

Closed petersalas closed 10 months ago

petersalas commented 10 months ago

Currently the prompt/completion log events include debug-serialized JSX. But this is a) difficult to extract data from and b) unnecessarily generic because we're already working with a very finite set of conversation components.

This changes the structure to include the final text and props (sans-children) instead. Additionally, we include a getElement() function so that consumers have the option to access the element itself, without it being JSON-serialized by default.

vercel[bot] commented 10 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai-jsx-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2023 11:45pm
ai-jsx-nextjs-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2023 11:45pm
ai-jsx-tutorial-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2023 11:45pm
ai-jsx-voice ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2023 11:45pm