Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 141293a

Browse filesBrowse files
committed
Fix python3.8 support
1 parent 656f3d8 commit 141293a
Copy full SHA for 141293a

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎llama_cpp/server/cli.py

Copy file name to clipboardExpand all lines: llama_cpp/server/cli.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def _parse_bool_arg(arg: str | bytes | bool) -> bool:
5555
raise ValueError(f"Invalid boolean argument: {arg}")
5656

5757

58-
def add_args_from_model(parser: argparse.ArgumentParser, model: type[BaseModel]):
58+
def add_args_from_model(parser: argparse.ArgumentParser, model: Type[BaseModel]):
5959
"""Add arguments from a pydantic model to an argparse parser."""
6060

6161
for name, field in model.model_fields.items():
@@ -83,7 +83,7 @@ def add_args_from_model(parser: argparse.ArgumentParser, model: type[BaseModel])
8383
)
8484

8585

86-
T = TypeVar("T", bound=type[BaseModel])
86+
T = TypeVar("T", bound=Type[BaseModel])
8787

8888

8989
def parse_model_from_args(model: T, args: argparse.Namespace) -> T:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.