.env
file. This file should contain your API keys for PromptLayer and OpenAI.
Get your PromptLayer API key through our dashboard by signing up at www.promptlayer.com
dotenv
package:
promptlayer
and set up our API key for PromptLayer. Make sure to pip install promptlayer
first if you are using Python.
import openai
for openai = promptlayer.openai
. The rest of your code stays the same!
In this step we’ll make a simple request to the OpenAI GPT-3 engine to generate a response for the prompt “My name is”.
pl_tags
) to our requests to make it easier to search through and organize requests on the dashboard.
Learn more about tags.
request_id
and a score.
PromptLayerCallbackHandler
, you can access tons of LLMs. Learn more.