Skip to content

Commit 1313ec0

Browse files
committed
Address last couple of comments
1 parent daa4062 commit 1313ec0

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

nemoguardrails/embeddings/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def generate_key(self, text: str) -> str:
8383
class CacheStore(ABC):
8484
"""Abstract class for cache stores."""
8585

86-
name: str # Class attribute that should be defined in subclasses
86+
name: str
8787

8888
@abstractmethod
8989
def get(self, key):

nemoguardrails/embeddings/providers/azureopenai.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ class AzureEmbeddingModel(EmbeddingModel):
4646

4747
def __init__(self, embedding_model: str):
4848
try:
49-
from openai import (
50-
AzureOpenAI, # type: ignore[attr-defined] (Assume this is installed)
51-
)
49+
from openai import AzureOpenAI # type: ignore
5250
except ImportError:
5351
raise ImportError(
5452
"Could not import openai, please install it with "
@@ -58,7 +56,7 @@ def __init__(self, embedding_model: str):
5856
self.client = AzureOpenAI(
5957
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
6058
api_version=os.getenv("AZURE_OPENAI_API_VERSION"),
61-
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"), # type: ignore[arg-type] (comes from `$AZURE_OPENAI_ENDPOINT`)
59+
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"),
6260
)
6361

6462
self.embedding_model = embedding_model

0 commit comments

Comments
 (0)