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
It will have error like 404 error with the endpoint '/v1/completions'. The error is because is_chat_model param is not passed into the model. If the model itself does not support /v1/completions endpoint, it will have error as it doesn't call /v1/chat/completions'.
Additional context
The root cause may be due to llm_instance params is using llm_class.init instead of the llm_class...
autorag/nodes/generator/llama_index_llm.py line 52 __init__ method
self.llm_instance: BaseLLM = llm_class(**pop_params(llm_class.__init__, kwargs))
When using openAILike, it is converting the OpenAI params with ignoring OpenAILike params....
Possible fix
Stupid but quick fix...
llm_openaiLIke_params = None
if llm_class.class_name() == "OpenAILike":
llm_openaiLIke_params = pop_params(llm_class, kwargs)
original_llm_params = pop_params(llm_class.__init__, kwargs)
if llm_openaiLIke_params is not None:
llm_params = {**llm_openaiLIke_params,**original_llm_params}
else:
llm_params = original_llm_params
self.llm_instance: BaseLLM = llm_class(**llm_params)
The text was updated successfully, but these errors were encountered:
Describe the bug
OpenAILIKE additional params are not supported like is_chat_model param...
To Reproduce
Configure the following llm module and use is_chat_model param like the following:
It will have error like 404 error with the endpoint '/v1/completions'. The error is because is_chat_model param is not passed into the model. If the model itself does not support /v1/completions endpoint, it will have error as it doesn't call /v1/chat/completions'.
Additional context
The root cause may be due to llm_instance params is using llm_class.init instead of the llm_class...
When using openAILike, it is converting the OpenAI params with ignoring OpenAILike params....
Possible fix
Stupid but quick fix...
The text was updated successfully, but these errors were encountered: