Skip to content

Commit

Permalink
fix types again?
Browse files Browse the repository at this point in the history
  • Loading branch information
transmissions11 committed Jun 11, 2024
1 parent 9058441 commit 06da702
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import { NavigationBar } from "./utils/NavigationBar";
import { CheckCircleIcon } from "@chakra-ui/icons";
import { Box, useDisclosure, Spinner, useToast } from "@chakra-ui/react";
import mixpanel from "mixpanel-browser";
import { CreateCompletionResponseChoicesInner, OpenAI } from "openai-streams";
import { ChatCompletionRequestMessageInner, OpenAI } from "openai-streams";
import { Resizable } from "re-resizable";
import { useEffect, useState, useCallback, useRef } from "react";
import { useBeforeunload } from "react-beforeunload";
Expand Down Expand Up @@ -392,8 +392,7 @@ function App() {
"No choices in response. Decoded response: " + JSON.stringify(decoded)
);

const choice: CreateChatCompletionStreamResponseChoicesInner =
decoded.choices[0];
const choice: ChatCompletionRequestMessageInner = decoded.choices[0];

if (choice.index === undefined)
throw new Error(
Expand Down

0 comments on commit 06da702

Please sign in to comment.