mirror of
https://github.com/imartinez/privateGPT.git
synced 2025-09-08 02:30:02 +00:00
fix: Remove global state (#1216)
* Remove all global settings state * chore: remove autogenerated class * chore: cleanup * chore: merge conflicts
This commit is contained in:
@@ -4,7 +4,7 @@ from llama_index.llms.base import LLM
|
||||
from llama_index.llms.llama_utils import completion_to_prompt, messages_to_prompt
|
||||
|
||||
from private_gpt.paths import models_path
|
||||
from private_gpt.settings.settings import settings
|
||||
from private_gpt.settings.settings import Settings
|
||||
|
||||
|
||||
@singleton
|
||||
@@ -12,7 +12,7 @@ class LLMComponent:
|
||||
llm: LLM
|
||||
|
||||
@inject
|
||||
def __init__(self) -> None:
|
||||
def __init__(self, settings: Settings) -> None:
|
||||
match settings.llm.mode:
|
||||
case "local":
|
||||
from llama_index.llms import LlamaCPP
|
||||
|
Reference in New Issue
Block a user