Rename method _get_gpt4all_answer to _get_answer (#727)
This commit is contained in:
@@ -14,7 +14,7 @@ class GPT4ALLLlm(BaseLlm):
|
|||||||
self.instance = GPT4ALLLlm._get_instance(self.config.model)
|
self.instance = GPT4ALLLlm._get_instance(self.config.model)
|
||||||
|
|
||||||
def get_llm_model_answer(self, prompt):
|
def get_llm_model_answer(self, prompt):
|
||||||
return self._get_gpt4all_answer(prompt=prompt, config=self.config)
|
return self._get_answer(prompt=prompt, config=self.config)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_instance(model):
|
def _get_instance(model):
|
||||||
@@ -27,7 +27,7 @@ class GPT4ALLLlm(BaseLlm):
|
|||||||
|
|
||||||
return GPT4All(model_name=model)
|
return GPT4All(model_name=model)
|
||||||
|
|
||||||
def _get_gpt4all_answer(self, prompt: str, config: BaseLlmConfig) -> Union[str, Iterable]:
|
def _get_answer(self, prompt: str, config: BaseLlmConfig) -> Union[str, Iterable]:
|
||||||
if config.model and config.model != self.config.model:
|
if config.model and config.model != self.config.model:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"OpenSourceApp does not support switching models at runtime. Please create a new app instance."
|
"OpenSourceApp does not support switching models at runtime. Please create a new app instance."
|
||||||
|
|||||||
Reference in New Issue
Block a user