update experimental (#8402)

some changes were made to experimental, porting them over
This commit is contained in:
Harrison Chase
2023-07-28 13:01:36 -07:00
committed by GitHub
parent af7e70d4af
commit 3a78450883
13 changed files with 58 additions and 22 deletions

View File

@@ -23,7 +23,7 @@ def import_rellm() -> rellm:
try:
import rellm
except ImportError:
raise ValueError(
raise ImportError(
"Could not import rellm python package. "
"Please install it with `pip install rellm`."
)
@@ -31,6 +31,8 @@ def import_rellm() -> rellm:
class RELLM(HuggingFacePipeline):
"""RELLM wrapped LLM using HuggingFace Pipeline API."""
regex: RegexPattern = Field(..., description="The structured format to complete.")
max_new_tokens: int = Field(
default=200, description="Maximum number of new tokens to generate."