Update app.py
Browse filesChanged the model to gemini-2.5-flash-preview-05-20 and removed unused imports
app.py
CHANGED
|
@@ -5,7 +5,6 @@ import inspect
|
|
| 5 |
import pandas as pd
|
| 6 |
import asyncio
|
| 7 |
from langchain_google_genai.chat_models import ChatGoogleGenerativeAI
|
| 8 |
-
import requests
|
| 9 |
from typing import IO, Dict
|
| 10 |
from io import BytesIO
|
| 11 |
from langchain_core.messages import HumanMessage, SystemMessage
|
|
@@ -13,7 +12,6 @@ from langgraph.graph import MessagesState
|
|
| 13 |
from langgraph.graph import START, StateGraph
|
| 14 |
from langgraph.prebuilt import tools_condition
|
| 15 |
from langgraph.prebuilt import ToolNode
|
| 16 |
-
from pytube import YouTube
|
| 17 |
import base64
|
| 18 |
from google.ai.generativelanguage_v1beta.types import Tool as GenAITool
|
| 19 |
from google.ai.generativelanguage_v1beta.types import FileData
|
|
@@ -149,7 +147,7 @@ def google_search(query: str) -> str:
|
|
| 149 |
The search results as a string.
|
| 150 |
'''
|
| 151 |
llm = ChatGoogleGenerativeAI(
|
| 152 |
-
model="gemini-2.5-flash-preview-
|
| 153 |
max_tokens=8192,
|
| 154 |
temperature=0
|
| 155 |
)
|
|
@@ -163,7 +161,7 @@ def google_search(query: str) -> str:
|
|
| 163 |
class BasicAgent:
|
| 164 |
def __init__(self):
|
| 165 |
self.llm = ChatGoogleGenerativeAI(
|
| 166 |
-
model="gemini-2.5-flash-preview-
|
| 167 |
max_tokens=8192,
|
| 168 |
temperature=0
|
| 169 |
)
|
|
|
|
| 5 |
import pandas as pd
|
| 6 |
import asyncio
|
| 7 |
from langchain_google_genai.chat_models import ChatGoogleGenerativeAI
|
|
|
|
| 8 |
from typing import IO, Dict
|
| 9 |
from io import BytesIO
|
| 10 |
from langchain_core.messages import HumanMessage, SystemMessage
|
|
|
|
| 12 |
from langgraph.graph import START, StateGraph
|
| 13 |
from langgraph.prebuilt import tools_condition
|
| 14 |
from langgraph.prebuilt import ToolNode
|
|
|
|
| 15 |
import base64
|
| 16 |
from google.ai.generativelanguage_v1beta.types import Tool as GenAITool
|
| 17 |
from google.ai.generativelanguage_v1beta.types import FileData
|
|
|
|
| 147 |
The search results as a string.
|
| 148 |
'''
|
| 149 |
llm = ChatGoogleGenerativeAI(
|
| 150 |
+
model="gemini-2.5-flash-preview-05-20",
|
| 151 |
max_tokens=8192,
|
| 152 |
temperature=0
|
| 153 |
)
|
|
|
|
| 161 |
class BasicAgent:
|
| 162 |
def __init__(self):
|
| 163 |
self.llm = ChatGoogleGenerativeAI(
|
| 164 |
+
model="gemini-2.5-flash-preview-05-20",
|
| 165 |
max_tokens=8192,
|
| 166 |
temperature=0
|
| 167 |
)
|