Spaces:
Running
Running
Set GOOGLE_API_KEY environement variable.
Browse files- llm_call.py +2 -0
llm_call.py
CHANGED
@@ -33,6 +33,8 @@ class GeminiLLM():
|
|
33 |
if os.getenv('GOOGLE_GEMINI_TOKEN') is None:
|
34 |
raise ValueError("GOOGLE_GEMINI_TOKEN environment variable not set")
|
35 |
else:
|
|
|
|
|
36 |
self.llm = ChatGoogleGenerativeAI(
|
37 |
model = self.model_name,
|
38 |
temperature = 0.7,
|
|
|
33 |
if os.getenv('GOOGLE_GEMINI_TOKEN') is None:
|
34 |
raise ValueError("GOOGLE_GEMINI_TOKEN environment variable not set")
|
35 |
else:
|
36 |
+
os.environ["GOOGLE_API_KEY"] = os.getenv('GOOGLE_GEMINI_TOKEN')
|
37 |
+
|
38 |
self.llm = ChatGoogleGenerativeAI(
|
39 |
model = self.model_name,
|
40 |
temperature = 0.7,
|