cdupland commited on
Commit
b8d12f6
1 Parent(s): 4399fa1

API KEY in secret environment

Browse files
Files changed (1) hide show
  1. rag_module.py +2 -1
rag_module.py CHANGED
@@ -24,10 +24,11 @@ from dotenv import load_dotenv
24
  load_dotenv()
25
  from collections import defaultdict
26
 
 
27
 
28
  class RagModule():
29
  def __init__(self):
30
- self.mistral_api_key = "jdkSsdQeimr6g3x3H4slLYhTKBEH5pRC"
31
  self.model_name_embedding = "mistral-embed"
32
  self.embedding_model = MistralAIEmbeddings(model=self.model_name_embedding, mistral_api_key=self.mistral_api_key)
33
  self.chunk_size = 1000
 
24
  load_dotenv()
25
  from collections import defaultdict
26
 
27
+ api_key = os.environ.get("MISTRAL_API_KEY")
28
 
29
  class RagModule():
30
  def __init__(self):
31
+ self.mistral_api_key = api_key
32
  self.model_name_embedding = "mistral-embed"
33
  self.embedding_model = MistralAIEmbeddings(model=self.model_name_embedding, mistral_api_key=self.mistral_api_key)
34
  self.chunk_size = 1000