Former-commit-id: d7547d6b9e4c660897e3ce0f4022e08686c172d5
This commit is contained in:
hiyouga
2024-07-13 22:07:58 +08:00
parent 27e13a8371
commit dfc7a7d5cd
4 changed files with 10 additions and 10 deletions

View File

@@ -16,6 +16,7 @@
# limitations under the License.
import asyncio
import os
from threading import Thread
from typing import TYPE_CHECKING, Any, AsyncGenerator, Dict, Generator, List, Optional, Sequence
@@ -115,13 +116,11 @@ class ChatModel:
def run_chat() -> None:
try:
import platform
if platform.system() != "Windows":
if os.name != "nt":
try:
import readline # noqa: F401
except ImportError:
print("Install `readline` for a better experience.")
except ImportError:
print("Install `readline` for a better experience.")
chat_model = ChatModel()
messages = []