Sujithanumala commited on
Commit
c949744
·
verified ·
1 Parent(s): 45db4e7

Update Classes/Owiki_Class.py

Browse files
Files changed (1) hide show
  1. Classes/Owiki_Class.py +5 -2
Classes/Owiki_Class.py CHANGED
@@ -10,8 +10,8 @@ import re
10
  from Classes.Helper_Class import DB_Retriever
11
  from typing import Optional
12
 
13
- os.environ["GOOGLE_API_KEY"] = "AIzaSyD5BAPI-PH4nbw4gY7BkcFFp1BTf2yR4bY"
14
- genai.configure(api_key="AIzaSyD5BAPI-PH4nbw4gY7BkcFFp1BTf2yR4bY")
15
 
16
  class OWiki:
17
  def __init__(self,**kwargs):
@@ -19,6 +19,9 @@ class OWiki:
19
  self.summary = kwargs['summary_length']
20
  model = kwargs["model"]
21
  self.db_loc = kwargs["db_loc"]
 
 
 
22
  self.llm = ChatGoogleGenerativeAI(model=model,
23
  temperature=temperature)
24
  self.model_embedding = kwargs['model_embeddings']
 
10
  from Classes.Helper_Class import DB_Retriever
11
  from typing import Optional
12
 
13
+
14
+
15
 
16
  class OWiki:
17
  def __init__(self,**kwargs):
 
19
  self.summary = kwargs['summary_length']
20
  model = kwargs["model"]
21
  self.db_loc = kwargs["db_loc"]
22
+ self.api_key = kwargs["api_key"]
23
+ os.environ["GOOGLE_API_KEY"] = self.api_key
24
+ genai.configure(api_key=self.api_key)
25
  self.llm = ChatGoogleGenerativeAI(model=model,
26
  temperature=temperature)
27
  self.model_embedding = kwargs['model_embeddings']