File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
nemoguardrails/embeddings Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def generate_key(self, text: str) -> str:
8383class 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 ):
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments