Nguyen Quang Truong commited on
Commit
419adfc
·
1 Parent(s): 4c31d91

update_env_2

Browse files
Agent/tools/kg_search.py CHANGED
@@ -21,7 +21,7 @@ examples = example_pairs["examples"]
21
 
22
  # LLM for choose the best similar examples
23
  load_dotenv()
24
- os.environ["GEMINI_API_KEY"] = os.getenv("GEMINI_API_KEY")
25
 
26
  embedding_model = GoogleGenerativeAIEmbeddings(
27
  model= "models/text-embedding-004"
@@ -63,7 +63,7 @@ def generate_cypher(question: str) -> str:
63
  os.environ["NEO4J_URI"] = os.getenv("NEO4J_URI")
64
  os.environ["NEO4J_USERNAME"] = os.getenv("NEO4J_USERNAME")
65
  os.environ["NEO4J_PASSWORD"] = os.getenv("NEO4J_PASSWORD")
66
- os.environ["GEMINI_API_KEY"] = os.getenv("GEMINI_API_KEY")
67
 
68
  gemini_chat = ChatGoogleGenerativeAI(
69
  model= "gemini-1.5-flash-latest"
 
21
 
22
  # LLM for choose the best similar examples
23
  load_dotenv()
24
+ os.environ["GOOGLE_API_KEY"] = os.getenv("GEMINI_API_KEY")
25
 
26
  embedding_model = GoogleGenerativeAIEmbeddings(
27
  model= "models/text-embedding-004"
 
63
  os.environ["NEO4J_URI"] = os.getenv("NEO4J_URI")
64
  os.environ["NEO4J_USERNAME"] = os.getenv("NEO4J_USERNAME")
65
  os.environ["NEO4J_PASSWORD"] = os.getenv("NEO4J_PASSWORD")
66
+ os.environ["GOOGLE_API_KEY"] = os.getenv("GEMINI_API_KEY")
67
 
68
  gemini_chat = ChatGoogleGenerativeAI(
69
  model= "gemini-1.5-flash-latest"
Agent/tools/tavily_search_v2.py CHANGED
@@ -7,7 +7,7 @@ from langchain.tools import BaseTool, StructuredTool, tool
7
  load_dotenv()
8
 
9
  os.environ["TAVILY_API_KEY"] = os.getenv("TAVILY_API_KEY")
10
- os.environ["GEMINI_API_KEY"] = os.getenv("GEMINI_API_KEY")
11
 
12
  def tavily_search(question: str) -> str:
13
  """
 
7
  load_dotenv()
8
 
9
  os.environ["TAVILY_API_KEY"] = os.getenv("TAVILY_API_KEY")
10
+ os.environ["GOOGLE_API_KEY"] = os.getenv("GEMINI_API_KEY")
11
 
12
  def tavily_search(question: str) -> str:
13
  """
Agent/utils.py CHANGED
@@ -16,7 +16,7 @@ def config():
16
  os.environ["NEO4J_URI"] = os.getenv("NEO4J_URI")
17
  os.environ["NEO4J_USERNAME"] = os.getenv("NEO4J_USERNAME")
18
  os.environ["NEO4J_PASSWORD"] = os.getenv("NEO4J_PASSWORD")
19
- os.environ["GEMINI_API_KEY"] = os.getenv("GEMINI_API_KEY")
20
 
21
  def load_prompt(filepath):
22
  with open(filepath, "r") as file:
 
16
  os.environ["NEO4J_URI"] = os.getenv("NEO4J_URI")
17
  os.environ["NEO4J_USERNAME"] = os.getenv("NEO4J_USERNAME")
18
  os.environ["NEO4J_PASSWORD"] = os.getenv("NEO4J_PASSWORD")
19
+ os.environ["GOOGLE_API_KEY"] = os.getenv("GEMINI_API_KEY")
20
 
21
  def load_prompt(filepath):
22
  with open(filepath, "r") as file: