It’s super easy to add PromptLayer to an existing project. Usually only takes one line.Get started with the code below!
Copy
Ask AI
# Make sure to `pip install promptlayer`import promptlayer# Swap out your 'from openai import OpenAI'OpenAI = promptlayer.openai.OpenAIclient = OpenAI()# Do something fun 🚀completion = client.chat.completions.create( model="gpt-3.5-turbo", messages=[ {"role": "system", "content": "You are an AI."}, {"role": "user", "content": "Compose a poem please."} ], pl_tags=["getting-started"])