# Use OpenAI's async api https://github.com/openai/openai-python#async-api
# Use OpenAI's async api https://github.com/openai/openai-python#async-api
returnawaitllm.client.acreate(**kwargs)
returnawaitllm.client.acreate(**kwargs)
@ -500,10 +500,11 @@ class BaseOpenAI(BaseLLM):
ifself.openai_proxy:
ifself.openai_proxy:
importopenai
importopenai
openai.proxy={
# raise Exception("The 'openai.proxy' option isn't read in the client API. You will need to pass it when you instantiate the client, e.g.",
"http":self.openai_proxy,
# 'OpenAI(proxy={
"https":self.openai_proxy,
# "http": self.openai_proxy,
}# type: ignore[assignment] # noqa: E501
# "https": self.openai_proxy,
# })'") # type: ignore[assignment] # noqa: E501
return{**openai_creds,**self._default_params}
return{**openai_creds,**self._default_params}
@property
@property
@ -787,11 +788,6 @@ class OpenAIChat(BaseLLM):
raiseException("The 'openai.api_base' option isn't read in the client API. You will need to pass it when you instantiate the client, e.g. 'OpenAI(api_base=openai_api_base)'")
raiseException("The 'openai.api_base' option isn't read in the client API. You will need to pass it when you instantiate the client, e.g. 'OpenAI(api_base=openai_api_base)'")
ifopenai_organization:
ifopenai_organization:
raiseException("The 'openai.organization' option isn't read in the client API. You will need to pass it when you instantiate the client, e.g. 'OpenAI(organization=openai_organization)'")
raiseException("The 'openai.organization' option isn't read in the client API. You will need to pass it when you instantiate the client, e.g. 'OpenAI(organization=openai_organization)'")