Feat/advanced prompt enhancement (#1340)
This commit is contained in:
parent
3efaa713da
commit
695841a3cf
4 changed files with 35 additions and 22 deletions
|
|
@ -56,6 +56,9 @@ class AppModelConfigService:
|
|||
cp["stop"] = []
|
||||
elif not isinstance(cp["stop"], list):
|
||||
raise ValueError("stop in model.completion_params must be of list type")
|
||||
|
||||
if len(cp["stop"]) > 4:
|
||||
raise ValueError("stop sequences must be less than 4")
|
||||
|
||||
# Filter out extra parameters
|
||||
filtered_cp = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue