from llama_cpp.llama_chat_format import format_alpaca if __name__ == "__main__": messages = [ { "role": "system", "content": "You are given an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.", }, { "role": "user", "content": "Have your friend evaluate the movie they had just seen and provide a summary opinion (e.g. terrible, bad, okay, good, or great) to determine the sentiment of the movie review.\n\nText: ( a ) slummer .\nSentiment: " }, { "role": "assistant", "content": None, }, ] formatted_prompt = format_alpaca(messages) print(formatted_prompt)