mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
fix: compatible with Python 3.7 by deferring Literal import in truncate.py
This commit is contained in:
@@ -8,7 +8,10 @@ Truncation is based on two independent limits - whichever is hit first wins:
|
|||||||
Never returns partial lines (except bash tail truncation edge case).
|
Never returns partial lines (except bash tail truncation edge case).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from typing import Dict, Any, Optional, Literal, Tuple
|
from __future__ import annotations
|
||||||
|
from typing import Dict, Any, Optional, Tuple, TYPE_CHECKING
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from typing import Literal
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_MAX_LINES = 2000
|
DEFAULT_MAX_LINES = 2000
|
||||||
|
|||||||
Reference in New Issue
Block a user