Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,9 +48,19 @@ class AdvancedAgent:
|
|
| 48 |
|
| 49 |
def build_graph(self):
|
| 50 |
"""Build the LangGraph agent with necessary tools"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
# Initialize LLM
|
| 52 |
-
llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0)
|
| 53 |
-
print("LLM initialized: Gemini 2.0 Flash")
|
| 54 |
|
| 55 |
# Initialize tools
|
| 56 |
wikipedia_tool = WikipediaQueryRun(api_wrapper=WikipediaAPIWrapper())
|
|
|
|
| 48 |
|
| 49 |
def build_graph(self):
|
| 50 |
"""Build the LangGraph agent with necessary tools"""
|
| 51 |
+
|
| 52 |
+
llm = ChatOpenAI(
|
| 53 |
+
model="google/gemini-2.5-pro-exp-03-25",
|
| 54 |
+
temperature=0,
|
| 55 |
+
openai_api_key=os.getenv("OPENROUTER_API_KEY"),
|
| 56 |
+
openai_api_base="https://openrouter.ai/api/v1"
|
| 57 |
+
)
|
| 58 |
+
print("LLM initialized: Gemini 2.5 Pro via OpenRouter")
|
| 59 |
+
|
| 60 |
+
|
| 61 |
# Initialize LLM
|
| 62 |
+
# llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0)
|
| 63 |
+
# print("LLM initialized: Gemini 2.0 Flash")
|
| 64 |
|
| 65 |
# Initialize tools
|
| 66 |
wikipedia_tool = WikipediaQueryRun(api_wrapper=WikipediaAPIWrapper())
|