Skip to content

Commit

Permalink
Better readme snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpalmer committed Jun 15, 2023
1 parent fe367b6 commit 93d68c0
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,11 @@ export default function Chat() {

return (
<div className="mx-auto w-full max-w-md py-24 flex flex-col stretch">
{messages.length > 0
? messages.map(m => (
<div key={m.id}>
{m.role === 'user' ? 'User: ' : 'AI: '}
{m.content}
</div>
))
: null}
{messages.map(m => (
<div key={m.id}>
{m.role}: {m.content}
</div>
))}

<form onSubmit={handleSubmit}>
<input
Expand Down

0 comments on commit 93d68c0

Please sign in to comment.