class_docstr: LiteLLMHandler is a MindsDB handler for litellm - https://docs.litellm.ai/docs/
class_docstr_tok: ["LiteLLMHandler","is","a","MindsDB","handler","for","litellm","-","https",":","\/\/docs.litellm.ai\/docs\/"]
docstr: Convert a prompt to a list of messages
docstr_tok: ["Convert","a","prompt","to","a","list","of","messages"]
code: def _prompt_to_messages(prompt: str, **kwargs) -> List[Dict]:
      """
      Convert a prompt to a list of messages
      """
  
      if kwargs:
          # if kwargs are passed in, format the prompt with kwargs
          prompt = prompt.format(**kwargs)
  
      return [{"content": prompt, "role": "user"}]
  
file_path: mindsdb/mindsdb/integrations/handlers/litellm_handler/litellm_handler.py
imports: import ast
  from typing import Dict, Optional, List
  import pandas
  from mindsdb.integrations.libs.base import BaseMLEngine
  from mindsdb.utilities import log
  from mindsdb.integrations.handlers.litellm_handler.settings import CompletionParameters
  from litellm import completion, batch_completion
label_desc: Use image node_id 5 for calling the LiteLLMHandler obj's underlying member method code with example usage: obj._prompt_to_messages(prompt) and returns: list