update
This commit is contained in:
@@ -87,7 +87,7 @@ function generatePrompt_tokenSuffix(a::agent;
|
||||
content = msg[:content]
|
||||
|
||||
if role == "system"
|
||||
prompt = replace(systemToken, "content" => content)
|
||||
prompt = replace(systemToken, "content" => content) * " "
|
||||
elseif role == "user"
|
||||
prompt *= " " * content * userToken
|
||||
elseif role == "assistant"
|
||||
@@ -101,7 +101,7 @@ function generatePrompt_tokenSuffix(a::agent;
|
||||
end
|
||||
|
||||
function generatePrompt_tokenPrefix(a::agent;
|
||||
userToken::String=" [/INST]", assistantToken=" [INST]",
|
||||
userToken::String="[/INST]", assistantToken="[INST]",
|
||||
systemToken="[INST]<<SYS>> content <</SYS>>")
|
||||
prompt = nothing
|
||||
for msg in a.messages
|
||||
@@ -109,7 +109,7 @@ function generatePrompt_tokenPrefix(a::agent;
|
||||
content = msg[:content]
|
||||
|
||||
if role == "system"
|
||||
prompt = replace(systemToken, "content" => content)
|
||||
prompt = replace(systemToken, "content" => content) * " "
|
||||
elseif role == "user"
|
||||
prompt *= userToken * content * " "
|
||||
elseif role == "assistant"
|
||||
|
||||
Reference in New Issue
Block a user