Fix typing, linting and add tests

This commit is contained in:
Louis 2023-12-03 16:31:20 +01:00
parent 76faffb269
commit 5bc5054000
3 changed files with 111 additions and 47 deletions

View file

@ -22,12 +22,14 @@ class LLMComponent:
case "local":
from llama_index.llms import LlamaCPP
from private_gpt.components.llm.prompt.prompt_helper import get_prompt_style
from private_gpt.components.llm.prompt.prompt_helper import (
get_prompt_style,
)
prompt_style = get_prompt_style(
prompt_style=settings.local.prompt_style,
template_name=settings.local.template_name,
default_system_prompt=settings.local.default_system_prompt
default_system_prompt=settings.local.default_system_prompt,
)
self.llm = LlamaCPP(