Skip to content

Commit

Permalink
Fix regenerate in chat playground for legacy inputs (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed Mar 12, 2024
1 parent 317356e commit bd5f8db
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion langserve/chat_playground/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" href="/____LANGSERVE_BASE_URL/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Chat Playground</title>
<script type="module" crossorigin src="/____LANGSERVE_BASE_URL/assets/index-d9089d96.js"></script>
<script type="module" crossorigin src="/____LANGSERVE_BASE_URL/assets/index-86d4d9c0.js"></script>
<link rel="stylesheet" href="/____LANGSERVE_BASE_URL/assets/index-434ff580.css">
</head>
<body>
Expand Down
6 changes: 1 addition & 5 deletions langserve/chat_playground/src/components/ChatWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ export function ChatWindow(props: {
if (inputKey === undefined) {
startStream({ [messagesInputKey]: newMessages }, {});
} else {
console.log({
[messagesInputKey]: newMessages.slice(0, -1),
[inputKey]: newMessages[newMessages.length - 1].content
})
startStream({
[messagesInputKey]: newMessages.slice(0, -1),
[inputKey]: newMessages[newMessages.length - 1].content
Expand All @@ -84,7 +80,7 @@ export function ChatWindow(props: {
} else {
startStream({
[messagesInputKey]: messages.slice(0, -1),
[inputKey]: messages[messages.length - 1]
[inputKey]: messages[messages.length - 1].content
}, {});
}
};
Expand Down

0 comments on commit bd5f8db

Please sign in to comment.