You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
max_tokens=8192ifnotllm:
# Model name is provided by tenant, but not system built-inllm=TenantLLMService.query(tenant_id=dialog.tenant_id, llm_name=llm_id) ifnotmodel_providerelse \
TenantLLMService.query(tenant_id=dialog.tenant_id, llm_name=llm_id, llm_factory=model_provider)
ifnotllm:
raiseLookupError("LLM(%s) not found"%dialog.llm_id)
ifllmandllm[0] andhasattr(llm[0], 'max_tokens'):
max_tokens=llm[0].max_tokens
Describe your problem
聊天功能处理代码,dialog_service.py中147行的
llm = LLMService.query(llm_name=llm_id) if not model_provider else LLMService.query(llm_name=llm_id, fid=model_provider)
这段的处理,对于自定义的LLM,是查询不出结果,到下面的if判断中,max_tokens的值只能是8192。而自定义的模型max_tokens可以更大。
现在这样处理是不是有问题?
The text was updated successfully, but these errors were encountered: