suluyana

Results 2 comments of suluyana

MemoryWithRag默认的embedding模型也会调用dashscope api,导致了这个问题。下载使用本地embedding模型的方式理论上直接可用,但还未测试,我们测试后提供。这里直接用dashscope api是因为本地模型支持的并发量较低,此前出现过响应过慢超时的问题。 另外两个MemoryWithXxx类会使用下载开源embedding模型。

可以参考以下代码: ` from modelscope_agent.memory import MemoryWithRag from modelscope_agent.agents import RolePlay role_template = '知识库查询小助手,可以优先通过查询本地知识库来回答用户的问题' llm_config = { 'model': 'GLM-4', 'model_server': 'zhipu' } function_list = [] file_paths = ['./tests/samples/常见QA.pdf'] bot = RolePlay(function_list=function_list,llm=llm_config,...