Skip to content

Commit 4d13e1d

Browse files
authored
Merge pull request #11 from AletheiaFact/fix-hard-coded-seppapi-key
Fix: Replace serp api key to a env variable
2 parents b83886e + 6f3f1aa commit 4d13e1d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/crew/agents.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
from langchain.agents import Tool
88
from langchain_community.llms import Ollama
99
from dotenv import load_dotenv
10+
import os
1011

1112
load_dotenv()
13+
SERPAPI_API_KEY = os.getenv("SERPAPI_API_KEY")
14+
1215
phi3_llm = Ollama(model="phi3")
1316
chat_gpt_llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0)
1417
search = SerpAPIWrapper(
@@ -17,7 +20,7 @@
1720
"gl": "br",
1821
"hl": "pt",
1922
},
20-
serpapi_api_key="601e156ed7c08c1f117518eedb7f79319faa24d547538e2e16fe6254d4950918"
23+
serpapi_api_key=SERPAPI_API_KEY
2124
)
2225
output_parser = StrOutputParser()
2326

0 commit comments

Comments
 (0)