File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -556,6 +556,7 @@ def generate(
556
556
filter_prefer_eos : bool = False ,
557
557
return_last_results : bool = False ,
558
558
embeddings : list [ExLlamaV2MMEmbedding ] | list [list [ExLlamaV2MMEmbedding ]] | None = None ,
559
+ banned_strings : list | None = None ,
559
560
** kwargs
560
561
):
561
562
"""
@@ -617,6 +618,9 @@ def generate(
617
618
:param embeddings:
618
619
Optional list of ExLlamaV2MMEmbeddings to use for, or list of lists for batched generation
619
620
621
+ :param banned_strings:
622
+ Optional list of strings to exclude from the output
623
+
620
624
:return:
621
625
Completion(s): (str or list[str] depending on the type of the input prompt argument)
622
626
Optionally, last results: (dict or list[dict] depending on the type of the input prompt argument)
@@ -685,7 +689,8 @@ def generate(
685
689
filter_prefer_eos = filter_prefer_eos ,
686
690
token_healing = token_healing ,
687
691
decode_special_tokens = decode_special_tokens ,
688
- embeddings = embeddings [idx ] or []
692
+ embeddings = embeddings [idx ] or [],
693
+ banned_strings = banned_strings
689
694
)
690
695
691
696
if seed is not None : seed += 1
You can’t perform that action at this time.
0 commit comments