Interact with Portkey as you normally would. Our Instrumentor will automatically trace and send the telemetry data to our platform.
Copy
client = Portkey(virtual_key=os.environ["PORTKEY_VIRTUAL_KEY"])completion = client.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Write a 6-word story about a robot who discovers music."}])print(completion.choices[0].message.content)