constDEFAULT_SYSTEM_PROMPT=`You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.`;
},"")+"\n\nAssistant:",// Here we're differing from A16Z by omitting the space. Generally spaces at the end of prompts decrease performance due to tokenization
},
},
});
});
return{
return{
message:{
message:{
content:(responseas Array<string>).join(""),// We need to do this because replicate returns a list of strings (for streaming functionality)
content:(responseas Array<string>).join(""),
// We need to do this because Replicate returns a list of strings (for streaming functionality which is not exposed by the run function)