Complete the code to set the system message role in a chat API call.
messages = [{"role": "[1]", "content": "You are a helpful assistant."}]The system role sets the behavior and context for the assistant before the conversation starts.
Complete the code to add a user message role with a question.
messages.append({"role": "[1]", "content": "What is AI?"})The user role represents the person asking questions or giving input.
Fix the error in the code to correctly add an assistant reply role.
messages.append({"role": "[1]", "content": "AI stands for Artificial Intelligence."})The assistant role is used for the AI's responses in the conversation.
Fill both blanks to create a conversation with system and user roles.
messages = [[1]{"role": "system", "content": "You are a friendly bot."}, [2]{"role": "user", "content": "Hello!"}]
The messages list starts and ends with square brackets []. Each message is a dictionary inside curly braces {}.
Fill all three blanks to add system, user, and assistant messages correctly.
messages = [[1]{"role": "system", "content": "You are helpful."}, [2]{"role": "user", "content": "What is ML?"}, [3]{"role": "assistant", "content": "ML means Machine Learning."}]
The messages list is enclosed in square brackets []. Each message is a dictionary enclosed in curly braces {}.