Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6f70cc4

Browse files
committed
bugfix: pydantic settings missing / changed fields
1 parent 0f3c474 commit 6f70cc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llama_cpp/server/__main__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030

3131
if __name__ == "__main__":
3232
parser = argparse.ArgumentParser()
33-
for name, field in Settings.__model_fields__.items():
34-
description = field.field_info.description
33+
for name, field in Settings.model_fields.items():
34+
description = field.description
3535
if field.default is not None and description is not None:
3636
description += f" (default: {field.default})"
3737
parser.add_argument(
3838
f"--{name}",
3939
dest=name,
40-
type=field.type_,
40+
type=field.annotation if field.annotation is not None else str,
4141
help=description,
4242
)
4343

0 commit comments

Comments
 (0)