diff --git a/llama_cpp/server/__main__.py b/llama_cpp/server/__main__.py index 2110db3..995dd44 100644 --- a/llama_cpp/server/__main__.py +++ b/llama_cpp/server/__main__.py @@ -30,14 +30,14 @@ from llama_cpp.server.app import create_app, Settings if __name__ == "__main__": parser = argparse.ArgumentParser() - for name, field in Settings.__model_fields__.items(): - description = field.field_info.description + for name, field in Settings.model_fields.items(): + description = field.description if field.default is not None and description is not None: description += f" (default: {field.default})" parser.add_argument( f"--{name}", dest=name, - type=field.type_, + type=field.annotation if field.annotation is not None else str, help=description, )