mirror of
https://github.com/abetlen/llama-cpp-python.git
synced 2023-09-07 17:34:22 +03:00
Format
This commit is contained in:
@@ -696,9 +696,7 @@ class Llama:
|
|||||||
llama_cpp.llama_reset_timings(self.ctx)
|
llama_cpp.llama_reset_timings(self.ctx)
|
||||||
|
|
||||||
if len(prompt_tokens) + max_tokens > self._n_ctx:
|
if len(prompt_tokens) + max_tokens > self._n_ctx:
|
||||||
raise ValueError(
|
raise ValueError(f"Requested tokens exceed context window of {self._n_ctx}")
|
||||||
f"Requested tokens exceed context window of {self._n_ctx}"
|
|
||||||
)
|
|
||||||
|
|
||||||
if stop != []:
|
if stop != []:
|
||||||
stop_sequences = [s.encode("utf-8") for s in stop]
|
stop_sequences = [s.encode("utf-8") for s in stop]
|
||||||
|
|||||||
Reference in New Issue
Block a user