For example, in the OpenAI Chat Completions API, a chat message can be associated with an AI assistant, a human or a system role.Create a chat prompt template like this:from langchain.prompts import ChatPromptTemplatechat_template = ChatPromptTemplate.from_messages([    ("system", "You are a helpful AI bot. Your name is {name}."),    ("human", "Hello, how are you doing?"),    ("ai", "I'm doing well, thanks!"),    ("human", "{user_input}"),])messages = chat_template.format_messages(    name="Bob",    user_input="What is your name?")ChatPromptTemplate.from_messages accepts a variety of message representations.For example, in addition to using the 2-tuple representation of (type, content) used
Prompt templates are pre-defined recipes for generating prompts for language models.
Prompt templates are pre-defined recipes for generating prompts for language models. ->: For example, in the OpenAI Chat Completions API, a chat message can be associated with an AI assistant, a human or a system role.Create a chat prompt template like this:from langchain.prompts import ChatPromptTemplatechat_template = ChatPromptTemplate.from_messages([    ("system", "You are a helpful AI bot. Your name is {name}."),    ("human", "Hello, how are you doing?"),    ("ai", "I'm doing well, thanks!"),    ("human", "{user_input}"),])messages = chat_template.format_messages(    name="Bob",    user_input="What is your name?")ChatPromptTemplate.from_messages accepts a variety of message representations.For example, in addition to using the 2-tuple representation of (type, content) used