mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
read existing configuration, save enums properly
This commit is contained in:
parent
2cf9915806
commit
3bc827cd5f
3 changed files with 63 additions and 26 deletions
|
@ -7,21 +7,13 @@
|
|||
import argparse
|
||||
import json
|
||||
|
||||
from enum import Enum
|
||||
|
||||
from llama_models.sku_list import resolve_model
|
||||
|
||||
from termcolor import colored
|
||||
|
||||
from llama_toolchain.cli.subcommand import Subcommand
|
||||
from llama_toolchain.cli.table import print_table
|
||||
|
||||
|
||||
class EnumEncoder(json.JSONEncoder):
|
||||
def default(self, obj):
|
||||
if isinstance(obj, Enum):
|
||||
return obj.value
|
||||
return super().default(obj)
|
||||
from llama_toolchain.utils import EnumEncoder
|
||||
|
||||
|
||||
class ModelDescribe(Subcommand):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue