Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
mslhrotk committed Aug 8, 2023
1 parent 4b36cab commit 9c3147e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ def __init__(
self.running_on_synapse_internal = running_on_synapse_internal()
if running_on_synapse_internal():
from synapse.ml.fabric.service_discovery import get_fabric_env_config
self._setDefault(url=get_fabric_env_config().fabric_env_config.ml_workload_endpoint + "cognitive/openai")

self._setDefault(
url=get_fabric_env_config().fabric_env_config.ml_workload_endpoint
+ "cognitive/openai"
)
kwargs = self._input_kwargs
if subscriptionKey:
kwargs["subscriptionKey"] = subscriptionKey
Expand Down Expand Up @@ -203,6 +207,7 @@ def udfFunction(x):

if self.running_on_synapse_internal and not self.isSet(self.url):
from synapse.ml.fabric.prerun.openai_prerun import OpenAIPrerun

OpenAIPrerun(api_base=self.getUrl()).init_personalized_session(None)
else:
openai.api_type = "azure"
Expand Down

0 comments on commit 9c3147e

Please sign in to comment.