because it already possible to set an custom host on portkey object, when we put a virtual key, with open ai en the regular url, it override the url when we run chat compeltion
from portkey_ai import Portkey
portkey = Portkey(
api_key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
provider="openai",
virtual_key="test-xxxx-b9xxxb",
custom_host="https://chat.XXXXXXXX.com/v1"
)
completion = portkey.chat.completions.create(
messages= [{ "role": 'user', "content": 'Why is open-source software important?' }],
model='meta-llama-31-8b-it'
)
print(completion)
it is working perfectly, the problem , is as we can't set the custom_url directly when we are creating the virtual_key, we can't use this virtual key alone, to associate it with user and workspace