Welcome to Portkey Forum

Updated 2 months ago

Passing Metadata with Prompt/Completions Endpoint Using Portkey Python SDK

At a glance
H
s
5 comments
One solution I found is to create a copy of the client for each request using .with_options and pass the metadata.

Would this be the correct approach?
yes! with_options is the correct way
if you dont want to initialize the client again
but internally it also creates another client instance only
any specific reason the headers are being set to {} in the sdk? if they were not removed we can pass the metadata using header kwarg
Add a reply
Sign up and join the conversation on Discord