diff --git a/private_gpt/ui/ui.py b/private_gpt/ui/ui.py index c23bd378fa..c7b538a3e9 100644 --- a/private_gpt/ui/ui.py +++ b/private_gpt/ui/ui.py @@ -1,6 +1,7 @@ """This file should be imported only and only if you want to run the UI locally.""" import itertools import logging +import time from collections.abc import Iterable from pathlib import Path from typing import Any @@ -87,6 +88,7 @@ def yield_deltas(completion_gen: CompletionGen) -> Iterable[str]: elif isinstance(delta, ChatResponse): full_response += delta.delta or "" yield full_response + time.sleep(0.02) if completion_gen.sources: full_response += SOURCES_SEPARATOR