Add verbose flag to server

This commit is contained in:
Andrei Betlen 2023-05-07 05:09:10 -04:00
parent 5f43c553d5
commit 627811ea83

View file

@ -48,6 +48,9 @@ class Settings(BaseSettings):
vocab_only: bool = Field( vocab_only: bool = Field(
default=False, description="Whether to only return the vocabulary." default=False, description="Whether to only return the vocabulary."
) )
verbose: bool = Field(
default=True, description="Whether to print debug information."
)
router = APIRouter() router = APIRouter()
@ -83,6 +86,7 @@ def create_app(settings: Optional[Settings] = None):
n_ctx=settings.n_ctx, n_ctx=settings.n_ctx,
last_n_tokens_size=settings.last_n_tokens_size, last_n_tokens_size=settings.last_n_tokens_size,
vocab_only=settings.vocab_only, vocab_only=settings.vocab_only,
verbose=settings.verbose,
) )
if settings.cache: if settings.cache:
cache = llama_cpp.LlamaCache() cache = llama_cpp.LlamaCache()