Jogi Reddy

Results 3 comments of Jogi Reddy

As the comments suggested to reuse the OpenAI client ` from openai import OpenAI _client = OpenAI( api_key='', ) def get_openai(user: User) -> OpenAI: return _client.with_options(api_key=user.openai_api_key) ` This is how...

Yes this is something I can try. will give a try and get back

So when I tried the approach suggested for caching and creating a global client both didn't work as expected. In case of reusing same client with_options function to override the...