class CacheModelInfo(object): modeltype: int modelpath: str modelname: str…
Jump to turn (12)
- 1class CacheModelInfo(object): modeltype: int modelpath: str modelname: str cache
- 2cachemodellist: Optional[List[CacheModelInfo]] = [] 这样写报错 Mutable default '[]' i
- 3Python3 检查文件夹是否存在 不存在则创建
- 4class CacheModelInfo(object): modeltype: int modelpath: str modelname: str 将这个转J
- 5这个对象能直接转JSON字符串妈
- 6class CacheModelInfo(object): modeltype: int modelpath: str modelname: str def t
- 7jsonl 文档内容如下: { "modeltype": 1, "modelpath": "F:/repository/llm/modelcache\\Qwen
- 8请注意 如果按行读 第一行可能只有一个 {
- 9Python3 定义枚举
- 10class ResponseCode(Enum): SUCCESS = 200 EXISTDATA = 201 FAILED = 300 class Respo
- 11如何 Response 如下定义呢 data 是一个字典,并且可以各种数据类型 class Response(object): def init(self):
- 12对象如下: class LlamaQwen2LLM(CustomLLM): """ llamaindex 基于本地 Qwen2 自定义 LLM 类 """ co
- User
class CacheModelInfo(object): model_type: int model_path: str model_name: str
_cache_model_list: Optional[List[CacheModelInfo]] = List[CacheModelInfo]
codemodel_info = CacheModelInfo() model_info.model_name = model.model_name model_info.model_type = model.model_type model_info.model_path = model_dir_cache_model_list.insert(model_info) 报错: AppSettings.cache_model_list.insert(model_info) TypeError: descriptor 'insert' for 'list' objects doesn't apply to a 'CacheModelInfo' object
该怎么修改
- Assistant