File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,9 @@ def make_model(self):
110110class AzureModelArgs (BaseModelArgs ):
111111 """Serializable object for instantiating a generic chat model with an Azure model."""
112112
113- deployment_name : str = None # NOTE: deployment_name is deprecated for Azure OpenAI and won't be used.
113+ deployment_name : str = (
114+ None # NOTE: deployment_name is deprecated for Azure OpenAI and won't be used.
115+ )
114116
115117 def make_model (self ):
116118 return AzureChatModel (
@@ -405,9 +407,13 @@ def __init__(
405407 log_probs = False ,
406408 ):
407409 api_key = api_key or os .getenv ("AZURE_OPENAI_API_KEY" )
408- assert api_key , "AZURE_OPENAI_API_KEY has to be defined in the environment when using AzureChatModel"
410+ assert (
411+ api_key
412+ ), "AZURE_OPENAI_API_KEY has to be defined in the environment when using AzureChatModel"
409413 endpoint = os .getenv ("AZURE_OPENAI_ENDPOINT" )
410- assert endpoint , "AZURE_OPENAI_ENDPOINT has to be defined in the environment when using AzureChatModel"
414+ assert (
415+ endpoint
416+ ), "AZURE_OPENAI_ENDPOINT has to be defined in the environment when using AzureChatModel"
411417
412418 if deployment_name is not None :
413419 logging .info (
Original file line number Diff line number Diff line change 2121
2222@pytest .mark .pricy
2323@pytest .mark .skipif (skip_tests , reason = "Skipping on remote as Azure is pricy" )
24- @pytest .mark .skipif (not os .getenv ("AZURE_OPENAI_API_KEY" ), reason = "Skipping as Azure API key not set" )
24+ @pytest .mark .skipif (
25+ not os .getenv ("AZURE_OPENAI_API_KEY" ), reason = "Skipping as Azure API key not set"
26+ )
2527def test_api_model_args_azure ():
2628 model_args = AzureModelArgs (
2729 model_name = "gpt-4.1-nano" ,
@@ -66,7 +68,9 @@ def test_api_model_args_openai():
6668
6769@pytest .mark .pricy
6870@pytest .mark .skipif (skip_tests , reason = "Skipping on remote as Anthropic is pricy" )
69- @pytest .mark .skipif (not os .getenv ("ANTHROPIC_API_KEY" ), reason = "Skipping as Anthropic API key not set" )
71+ @pytest .mark .skipif (
72+ not os .getenv ("ANTHROPIC_API_KEY" ), reason = "Skipping as Anthropic API key not set"
73+ )
7074def test_api_model_args_anthropic ():
7175 model_args = AnthropicModelArgs (
7276 model_name = "claude-3-haiku-20240307" ,
You can’t perform that action at this time.
0 commit comments