PromptLayer
PromptLayer is a platform for prompt engineering. It also helps with the LLM observability to visualize requests, version prompts, and track usage.
While
PromptLayerdoes have LLMs that integrate directly with LangChain (e.g.PromptLayerOpenAI), using a callback is the recommended way to integratePromptLayerwith LangChain.
In this guide, we will go over how to setup the PromptLayerCallbackHandler.
See PromptLayer docs for more information.
Installation and Setup
%pip install --upgrade --quiet langchain-community promptlayer --upgrade
Getting API Credentials
If you do not have a PromptLayer account, create one on promptlayer.com. Then get an API key by clicking on the settings cog in the navbar and
set it as an environment variabled called PROMPTLAYER_API_KEY