Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
phughesmcr committed Sep 4, 2024
1 parent 699f54e commit 43dd337
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/DebateFormInputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const DebateFormInputs = ({
<select
id="moderatorVoice"
value={moderatorVoice}
onChange={(e) => setModeratorVoice(e.target.value as VoiceType | "none")}
onChange={(e) => setModeratorVoice((e.target as HTMLSelectElement).value as VoiceType | "none")}
class="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
>
<option value="none">No Moderator</option>
Expand Down
4 changes: 2 additions & 2 deletions lib/debate/submit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export async function makeAPIRequest(
);
const finishReason = part.choices[0]?.finish_reason;

if (content && !controller.desiredSize) {
if (content) {
fullContent += content;
controller.enqueue(
encoder.encode(
Expand All @@ -101,7 +101,7 @@ export async function makeAPIRequest(
}

if (finishReason) {
if (finishReason !== "stop" && !controller.desiredSize) {
if (finishReason !== "stop") {
controller.enqueue(
encoder.encode(
`data: ${
Expand Down

0 comments on commit 43dd337

Please sign in to comment.