fix gguf-py: Conversion error when multiple licenses are configured (#9807)

* fix general.license list to str

* fix join license list

---------

Co-authored-by: momonga <115213907+mmnga@users.noreply.github.com>
This commit is contained in:
momonga 2024-11-24 09:09:22 +09:00 committed by GitHub
parent 55ed008b2d
commit 96fa2c5e2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -545,6 +545,9 @@ class Metadata:
gguf_writer.add_size_label(self.size_label)
if self.license is not None:
if isinstance(self.license, list):
gguf_writer.add_license(",".join(self.license))
else:
gguf_writer.add_license(self.license)
if self.license_name is not None:
gguf_writer.add_license_name(self.license_name)