mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 07:40:12 +01:00
feat(settings): Configurable context_window and tokenizer (#1437)
This commit is contained in:
parent
6eeb95ec7f
commit
4780540870
4 changed files with 43 additions and 7 deletions
|
|
@ -86,6 +86,18 @@ class LLMSettings(BaseModel):
|
|||
256,
|
||||
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.",
|
||||
)
|
||||
|
||||
|
||||
class VectorstoreSettings(BaseModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue