Arayüz üretmek için daha az token

Yapay zeka, Lyra UI ile %26 daha az token yazar.

Claude Sonnet'ten aynı sohbet, panel ve ayarlar arayüzlerini üç yöntemle oluşturmasını istedik: Lyra UI ile, React, Tailwind ve shadcn/ui ile, ayrıca düz HTML, CSS ve JavaScript ile (18 çalıştırma). Lyra UI ile shadcn/ui'ye göre %26 daha az çıktı tokenı ve %46 daha az satır, düz HTML'ye göre ise %33 daha az token yazdı; çünkü tek bir etiket işaretlemenin, stilin ve durumun yerini alıyor. Lyra çalıştırmaları ayrıca ajanların önbelleğe alıp yeniden kullandığı llms-full.txt başvurusunu da okudu.

Örnek

Birkaç etiketle bir sohbet arayüzü.

<script type="module">
  import '@aceshooting/lyra-ui/components/lr-chat-viewport.js';
  import '@aceshooting/lyra-ui/components/lr-chat-message.js';
  import '@aceshooting/lyra-ui/components/lr-chat-composer.js';
</script>

<lr-chat-viewport>
  <lr-chat-message message-role="user">Summarize this report.</lr-chat-message>
  <lr-chat-message message-role="assistant" status="streaming">Here are the key points…</lr-chat-message>
</lr-chat-viewport>
<lr-chat-composer placeholder="Ask anything"></lr-chat-composer>

Bileşenlere göz atın · Kılavuzu okuyun (İngilizce)