AgentVerse icon indicating copy to clipboard operation
AgentVerse copied to clipboard

Please register with the .register("local") method provided in LLMRegistry registry

Open nuocheng opened this issue 1 year ago • 2 comments

你好,我根据https://github.com/OpenBMB/AgentVerse/blob/main/README_simulation_cases.md这里面的任务进行操作的时候出现了如下问题: ValueError: local is not registered. Please register with the .register("local") method provided in LLMRegistry registry

我目前相关配置:

  1. llm部署:本地部署的qwen1.5-7b-chat模型,使用vllm进行部署,使用openai起的服务http://localhost:12073/v1/chat/completions
  2. 项目中配置:1)agentverse/tasks/nlp_classroom_9players/config.yaml有关llm_type:local model:Qwen1.5-7B-Chat 2)agentverse/llms/__init__.pyLOCAL_LLMS加入了Qwen1.5-7B-ChatLOCAL_LLMS_MAPPING中加入了Qwen1.5-7B-Chat的hf_model_name,base_url,api_key

但是会出现 local is not registered的问题 请问是还需要配置其他地方吗?

nuocheng avatar Jun 21 '24 10:06 nuocheng

您好,请问解决了吗?有类似可支持新注册的本地模型调用方法吗?

JunmingRen avatar Feb 08 '25 08:02 JunmingRen

Go to agentverse/llms/openai.py, about line 150. You will see a bunch of code like:

# To support your local LLMs, register it here and add it to LOCAL_LLMS.
@llm_registry.register("gpt-35-turbo")      
@llm_registry.register("gpt-3.5-turbo")
@llm_registry.register("gpt-4")
@llm_registry.register("vllm")
@llm_registry.register("local") # I believe this is newly updated

Then, add your own model here.

Masunori avatar Jun 14 '25 16:06 Masunori