matt HOFFNER commited on
Commit
b8fadbb
β€’
1 Parent(s): eb8b7c0

fix lint and cheaper model

Browse files
app/api/chat/route.ts CHANGED
@@ -25,7 +25,7 @@ export async function POST(req: Request) {
25
  const { messages, function_call } = await req.json()
26
 
27
  const response = await openai.chat.completions.create({
28
- model: 'gpt-4o',
29
  stream: true,
30
  messages,
31
  functions,
 
25
  const { messages, function_call } = await req.json()
26
 
27
  const response = await openai.chat.completions.create({
28
+ model: 'gpt-3.5-turbo',
29
  stream: true,
30
  messages,
31
  functions,
app/constants.ts CHANGED
@@ -1,3 +1,4 @@
 
1
  "use client";
2
 
3
  export default {
 
1
+ /* eslint-disable import/no-anonymous-default-export */
2
  "use client";
3
 
4
  export default {
app/input.tsx CHANGED
@@ -82,6 +82,7 @@ const VoiceInputForm: React.FC<VoiceInputFormProps> = ({ inputRef, handleSubmit,
82
  if (transcriber.isComplete) {
83
  handleTranscriptionComplete();
84
  }
 
85
  }, [transcriber]);
86
 
87
  useEffect(() => {
@@ -175,7 +176,7 @@ const VoiceInputForm: React.FC<VoiceInputFormProps> = ({ inputRef, handleSubmit,
175
  };
176
 
177
  useEffect(() => {
178
- let stream: MediaStream | null = null;
179
 
180
  if (recording) {
181
  const timer = setInterval(() => {
@@ -189,7 +190,7 @@ const VoiceInputForm: React.FC<VoiceInputFormProps> = ({ inputRef, handleSubmit,
189
 
190
  return () => {
191
  if (stream) {
192
- stream.getTracks().forEach((track) => track.stop());
193
  }
194
  };
195
  }, [recording]);
 
82
  if (transcriber.isComplete) {
83
  handleTranscriptionComplete();
84
  }
85
+ // eslint-disable-next-line react-hooks/exhaustive-deps
86
  }, [transcriber]);
87
 
88
  useEffect(() => {
 
176
  };
177
 
178
  useEffect(() => {
179
+ let stream: any = null;
180
 
181
  if (recording) {
182
  const timer = setInterval(() => {
 
190
 
191
  return () => {
192
  if (stream) {
193
+ stream.getTracks().forEach((track: { stop: () => any; }) => track.stop());
194
  }
195
  };
196
  }, [recording]);
package-lock.json ADDED
The diff for this file is too large to render. See raw diff