Repository: imartinez/privateGPT
File: private_gpt/settings/settings.py (Python)

Code before:
        description="The maximum number of token that the LLM is authorized to generate in one completion.",
    )
    context_window: int = Field(
        3900,
        description="The maximum number of context tokens for the model.",
    )
    tokenizer: str = Field(
        None,
        description="The model id of a predefined tokenizer hosted inside a model repo on "
        "huggingface.co. Valid model ids can be located at the root-level, like "
        "`bert-base-uncased`, or namespaced under a user or organization name, "
        "like `HuggingFaceH4/zephyr-7b-beta`. If not set, will load a tokenizer matching "
        "gpt-3.5-turbo LLM.",
    )
    temperature: float = Field(
        0.1,
        description="The temperature of the model. Increasing the temperature will make the model answer more creatively. A value of 0.1 would be more factual.",
    )
    prompt_style: Literal["default", "llama2", "tag", "mistral", "chatml"] = Field(
        "llama2",
        description=(
            "The prompt style to use for the chat engine. "
            "If `default` - use the default prompt style from the llama_index. It should look like `role: message`.\n"
            "If `llama2` - use the llama2 prompt style from the llama_index. Based on `
`, `
` and `
`.\n"
            "If `tag` - use the `tag` prompt style. It should look like `
: message`. \n"
            "If `mistral` - use the `mistral prompt style. It shoudl look like 

 {System Prompt} 


 { UserInstructions } 
"
            "`llama2` is the historic behaviour. `default` might work better with your custom models."
        ),
    )


class VectorstoreSettings(BaseModel):
    database: Literal["chroma", "qdrant", "postgres"]


class NodeStoreSettings(BaseModel):
    database: Literal["simple", "postgres"]


class LlamaCPPSettings(BaseModel):
    llm_hf_repo_id: str
    llm_hf_model_file: str
    prompt_style: Literal["default", "llama2", "tag", "mistral", "chatml"] = Field(
        "llama2",
        description=(
            "The prompt style to use for the chat engine. "
            "If `default` - use the default prompt style from the llama_index. It should look like `role: message`.\n"
            "If `llama2` - use the llama2 prompt style from the llama_index. Based on `
`, `
` and `
`.\n"
            "If `tag` - use the `tag` prompt style. It should look like `
: message`. \n"
            "If `mistral` - use the `mistral prompt style. It shoudl look like 

 {System Prompt} 


 { UserInstructions } 
"
            "`llama2` is the historic behaviour. `default` might work better with your custom models."

Review comment (suggestion):
```suggestion
            "If `mistral` - use the `mistral prompt style. It should look like 

 {System Prompt} 


 { UserInstructions } 
"
```

Code after:
        description="The maximum number of token that the LLM is authorized to generate in one completion.",
    )
    context_window: int = Field(
        3900,
        description="The maximum number of context tokens for the model.",
    )
    tokenizer: str = Field(
        None,
        description="The model id of a predefined tokenizer hosted inside a model repo on "
        "huggingface.co. Valid model ids can be located at the root-level, like "
        "`bert-base-uncased`, or namespaced under a user or organization name, "
        "like `HuggingFaceH4/zephyr-7b-beta`. If not set, will load a tokenizer matching "
        "gpt-3.5-turbo LLM.",
    )
    temperature: float = Field(
        0.1,
        description="The temperature of the model. Increasing the temperature will make the model answer more creatively. A value of 0.1 would be more factual.",
    )
    prompt_style: Literal["default", "llama2", "tag", "mistral", "chatml"] = Field(
        "llama2",
        description=(
            "The prompt style to use for the chat engine. "
            "If `default` - use the default prompt style from the llama_index. It should look like `role: message`.\n"
            "If `llama2` - use the llama2 prompt style from the llama_index. Based on `
`, `
` and `
`.\n"
            "If `tag` - use the `tag` prompt style. It should look like `
: message`. \n"
            "If `mistral` - use the `mistral prompt style. It shoudl look like 

 {System Prompt} 


 { UserInstructions } 
"
            "`llama2` is the historic behaviour. `default` might work better with your custom models."
        ),
    )


class VectorstoreSettings(BaseModel):
    database: Literal["chroma", "qdrant", "postgres"]


class NodeStoreSettings(BaseModel):
    database: Literal["simple", "postgres"]


class LlamaCPPSettings(BaseModel):
    llm_hf_repo_id: str
    llm_hf_model_file: str
    tfs_z: float = Field(
        1.0,
        description="Tail free sampling is used to reduce the impact of less probable tokens from the output. A higher value (e.g., 2.0) will reduce the impact more, while a value of 1.0 disables this setting.",
    )
    top_k: int = Field(
        40,
        description="Reduces the probability of generating nonsense. A higher value (e.g. 100) will give more diverse answers, while a lower value (e.g. 10) will be more conservative. (Default: 40)",
    )
    top_p: float = Field(