chore: Hello LangBot !

This commit is contained in:
Junyan Qin
2024-11-16 17:57:39 +08:00
parent 491d977d9e
commit 9fc891ec01
14 changed files with 25 additions and 31 deletions
+2 -2
View File
@@ -545,7 +545,7 @@ class Image(MessageComponent):
@pydantic.validator('path')
def validate_path(cls, path: typing.Union[str, Path, None]):
"""修复 path 参数的行为,使之相对于 QChatGPT 的启动路径。"""
"""修复 path 参数的行为,使之相对于 LangBot 的启动路径。"""
if path:
try:
return str(Path(path).resolve(strict=True))
@@ -673,7 +673,7 @@ class Voice(MessageComponent):
"""语音的长度,单位为秒。"""
@pydantic.validator('path')
def validate_path(cls, path: typing.Optional[str]):
"""修复 path 参数的行为,使之相对于 QChatGPT 的启动路径。"""
"""修复 path 参数的行为,使之相对于 LangBot 的启动路径。"""
if path:
try:
return str(Path(path).resolve(strict=True))