langchain.llms import OpenAIdef pl_id_callback(promptlayer_request_id):    print("prompt layer id ", promptlayer_request_id)    promptlayer.track.score(        request_id=promptlayer_request_id, score=100    )  # score is an integer 0-100    promptlayer.track.metadata(        request_id=promptlayer_request_id, metadata={"foo": "bar"}    )  # metadata is a dictionary of key value pairs that is tracked on PromptLayer    promptlayer.track.prompt(        request_id=promptlayer_request_id,        prompt_name="example",        prompt_input_variables={"product": "toasters"},        version=1,    )  # link the request to a prompt templateopenai_llm = OpenAI(    model_name="text-davinci-002",    callbacks=[PromptLayerCallbackHandler(pl_id_callback=pl_id_callback)],)example_prompt = promptlayer.prompts.get("example", version=1, langchain=True)openai_llm(example_prompt.format(product="toasters"))That is all it takes! After setup all your requests will show up on the PromptLayer dashboard.
PromptLayer
PromptLayer ->: langchain.llms import OpenAIdef pl_id_callback(promptlayer_request_id):    print("prompt layer id ", promptlayer_request_id)    promptlayer.track.score(        request_id=promptlayer_request_id, score=100    )  # score is an integer 0-100    promptlayer.track.metadata(        request_id=promptlayer_request_id, metadata={"foo": "bar"}    )  # metadata is a dictionary of key value pairs that is tracked on PromptLayer    promptlayer.track.prompt(        request_id=promptlayer_request_id,        prompt_name="example",        prompt_input_variables={"product": "toasters"},        version=1,    )  # link the request to a prompt templateopenai_llm = OpenAI(    model_name="text-davinci-002",    callbacks=[PromptLayerCallbackHandler(pl_id_callback=pl_id_callback)],)example_prompt = promptlayer.prompts.get("example", version=1, langchain=True)openai_llm(example_prompt.format(product="toasters"))That is all it takes! After setup all your requests will show up on the PromptLayer dashboard.