Spaces:
Sleeping
Sleeping
AFischer1985
commited on
Commit
•
57eea41
1
Parent(s):
ed60378
Update run.py
Browse files
run.py
CHANGED
@@ -80,12 +80,9 @@ def format_prompt0(message, history):
|
|
80 |
# Function for formatting multiturn-dialogue according to prompt template
|
81 |
#-------------------------------------------------------------------------
|
82 |
|
83 |
-
def format_prompt(message, history, system=None, RAGAddon=None, system2=None, zeichenlimit=None,historylimit=4, removeHTML=False
|
84 |
-
|
85 |
-
|
86 |
-
template0=" [INST] {system} [/INST] </s>" #" [INST] {system} [/INST] </s>" vs " [INST]{system}\n [/INST] </s>"
|
87 |
-
template1=" [INST] {message} [/INST]"
|
88 |
-
template2=" {response}</s>"
|
89 |
prompt = ""
|
90 |
if RAGAddon is not None:
|
91 |
system += RAGAddon
|
|
|
80 |
# Function for formatting multiturn-dialogue according to prompt template
|
81 |
#-------------------------------------------------------------------------
|
82 |
|
83 |
+
def format_prompt(message, history=None, system=None, RAGAddon=None, system2=None, zeichenlimit=None,historylimit=4, removeHTML=False,
|
84 |
+
startOfString="<s>", template0=" [INST] {system} [/INST] </s>",template1=" [INST] {message} [/INST]",template2=" {response}</s>"):
|
85 |
+
if zeichenlimit is None: zeichenlimit=1000000000 # :-)
|
|
|
|
|
|
|
86 |
prompt = ""
|
87 |
if RAGAddon is not None:
|
88 |
system += RAGAddon
|