code: #!/usr/bin/env python
  # -*- coding: utf-8 -*-
  # @Project      : AI.  @by PyCharm
  # @File         : promptwatch
  # @Time         : 2023/7/13 10:03
  # @Author       : betterme
  # @WeChat       : meutils
  # @Software     : PyCharm
  # @Description  :
  import os
  
  from meutils.pipe import *
  
  from langchain import OpenAI, LLMChain, PromptTemplate
  from promptwatch import PromptWatch, register_prompt_template
  
  prompt_template = PromptTemplate.from_template("这是个prompt： {input}")
  prompt_template = register_prompt_template("name_of_your_template", prompt_template)
  my_chain = LLMChain(llm=OpenAI(streaming=True), prompt=prompt_template)
  
  with PromptWatch(api_key=os.getenv('PROMPT_WATCH_API_KEY')) as pw:
      my_chain("1+1=")
  
apis: langchain.PromptTemplate.from_template langchain.OpenAI
extract_api: [((417, 467), 'langchain.PromptTemplate.from_template', 'PromptTemplate.from_template', (['"""这是个prompt： {input}"""'], {}), "('这是个prompt： {input}')\n", (445, 467), False, 'from langchain import OpenAI, LLMChain, PromptTemplate\n'), ((486, 552), 'promptwatch.register_prompt_template', 'register_prompt_template', (['"""name_of_your_template"""', 'prompt_template'], {}), "('name_of_your_template', prompt_template)\n", (510, 552), False, 'from promptwatch import PromptWatch, register_prompt_template\n'), ((577, 599), 'langchain.OpenAI', 'OpenAI', ([], {'streaming': '(True)'}), '(streaming=True)\n', (583, 599), False, 'from langchain import OpenAI, LLMChain, PromptTemplate\n'), ((651, 684), 'os.getenv', 'os.getenv', (['"""PROMPT_WATCH_API_KEY"""'], {}), "('PROMPT_WATCH_API_KEY')\n", (660, 684), False, 'import os\n')]