Deprecate generate method
This commit is contained in:
parent
b3805bb9cc
commit
6cf5876538
1 changed files with 6 additions and 0 deletions
|
@ -3,6 +3,7 @@ import sys
|
|||
import uuid
|
||||
import time
|
||||
import math
|
||||
import warnings
|
||||
import multiprocessing
|
||||
from typing import List, Optional, Union, Generator, Sequence, Iterator
|
||||
from collections import deque
|
||||
|
@ -239,6 +240,11 @@ class Llama:
|
|||
Yields:
|
||||
The generated tokens.
|
||||
"""
|
||||
warnings.warn(
|
||||
"Llama.generate is deprecated and will be removed in v0.2.0",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
assert self.ctx is not None
|
||||
self.reset()
|
||||
while True:
|
||||
|
|
Loading…
Reference in a new issue