mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2026-08-18 05:55:43 +08:00
[deps] goodbye python 3.9 (#9677)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: hiyouga <16256802+hiyouga@users.noreply.github.com> Co-authored-by: hiyouga <hiyouga@buaa.edu.cn>
This commit is contained in:
@@ -16,7 +16,7 @@ import json
|
||||
import os
|
||||
from collections.abc import Generator
|
||||
from contextlib import contextmanager
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from transformers.utils import is_torch_npu_available
|
||||
|
||||
@@ -81,7 +81,7 @@ class WebChatModel(ChatModel):
|
||||
def __init__(self, manager: "Manager", demo_mode: bool = False, lazy_init: bool = True) -> None:
|
||||
self.manager = manager
|
||||
self.demo_mode = demo_mode
|
||||
self.engine: Optional[BaseEngine] = None
|
||||
self.engine: BaseEngine | None = None
|
||||
|
||||
if not lazy_init: # read arguments from command line
|
||||
super().__init__()
|
||||
@@ -197,9 +197,9 @@ class WebChatModel(ChatModel):
|
||||
lang: str,
|
||||
system: str,
|
||||
tools: str,
|
||||
image: Optional[Any],
|
||||
video: Optional[Any],
|
||||
audio: Optional[Any],
|
||||
image: Any | None,
|
||||
video: Any | None,
|
||||
audio: Any | None,
|
||||
max_new_tokens: int,
|
||||
top_p: float,
|
||||
temperature: float,
|
||||
|
||||
Reference in New Issue
Block a user