Skip to content

Commit

Permalink
Fix the Reset logic for stopping the streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
staranbeer committed Oct 10, 2023
1 parent 3088bf5 commit ad44241
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/(services)/inference/_components/useInferenceSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ export function useInferenceSession(
const [streamMessage, setStreamMessage] = useState("")

const [error, setError] = useState<any>()

const resetSession = useCallback(() => {
setSession({} as Session)
setIsLoading(false)
setError("")
setIsDisabled(false)
setStreamMessage("")
// toast({ title: "session has been reset" })
}, [])

Expand Down

0 comments on commit ad44241

Please sign in to comment.