Skip to content

Commit 61ac1c9

Browse files
committed
minor cleanup and type ignore for Azure
1 parent 1313ec0 commit 61ac1c9

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

nemoguardrails/embeddings/basic.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ class BasicEmbeddingsIndex(EmbeddingsIndex):
4545
max_batch_hold: The maximum time a batch is held before being processed
4646
"""
4747

48-
# Instance attributes are defined in __init__ and accessed via properties
49-
5048
def __init__(
5149
self,
5250
embedding_model: str = "sentence-transformers/all-MiniLM-L6-v2",

nemoguardrails/embeddings/providers/azureopenai.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,13 @@ def __init__(self, embedding_model: str):
4949
from openai import AzureOpenAI # type: ignore
5050
except ImportError:
5151
raise ImportError(
52-
"Could not import openai, please install it with "
53-
"`pip install openai`."
52+
"Could not import openai, please install it with `pip install openai`."
5453
)
5554
# Set Azure OpenAI API credentials
5655
self.client = AzureOpenAI(
5756
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
5857
api_version=os.getenv("AZURE_OPENAI_API_VERSION"),
59-
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"),
58+
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"), # type: ignore
6059
)
6160

6261
self.embedding_model = embedding_model

0 commit comments

Comments
 (0)