Spaces:
Runtime error
Runtime error
gpt-4o
Browse files
app.py
CHANGED
|
@@ -130,13 +130,15 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 130 |
print(f"Using OpenAI API key: {openai_api_key[:4]}... (truncated for security)")
|
| 131 |
|
| 132 |
#NMODEL
|
|
|
|
| 133 |
llm_client = ChatGoogleGenerativeAI(
|
| 134 |
model="gemini-2.0-flash", # or another Gemini model name
|
| 135 |
google_api_key=google_api_key, # your Gemini API key
|
| 136 |
temperature=0,
|
| 137 |
)
|
|
|
|
| 138 |
|
| 139 |
-
|
| 140 |
|
| 141 |
tavily_api_key = os.getenv("TAVILY_API_KEY")
|
| 142 |
if not tavily_api_key:
|
|
@@ -217,15 +219,17 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 217 |
# Initialize gemini model with streaming enabled
|
| 218 |
# Streaming allows tokens to be processed in real-time, reducing response latency.
|
| 219 |
#NMODEL
|
|
|
|
| 220 |
summary_llm = ChatGoogleGenerativeAI(
|
| 221 |
model="gemini-2.0-flash", # or another Gemini model name
|
| 222 |
google_api_key=google_api_key, # your Gemini API key
|
| 223 |
temperature=0,
|
| 224 |
streaming=True
|
| 225 |
)
|
|
|
|
| 226 |
|
| 227 |
|
| 228 |
-
|
| 229 |
|
| 230 |
|
| 231 |
# Create a ReAct agent
|
|
|
|
| 130 |
print(f"Using OpenAI API key: {openai_api_key[:4]}... (truncated for security)")
|
| 131 |
|
| 132 |
#NMODEL
|
| 133 |
+
'''
|
| 134 |
llm_client = ChatGoogleGenerativeAI(
|
| 135 |
model="gemini-2.0-flash", # or another Gemini model name
|
| 136 |
google_api_key=google_api_key, # your Gemini API key
|
| 137 |
temperature=0,
|
| 138 |
)
|
| 139 |
+
'''
|
| 140 |
|
| 141 |
+
llm_client = ChatOpenAI(model='gpt-4o',temperature=0.1,api_key=openai_api_key)
|
| 142 |
|
| 143 |
tavily_api_key = os.getenv("TAVILY_API_KEY")
|
| 144 |
if not tavily_api_key:
|
|
|
|
| 219 |
# Initialize gemini model with streaming enabled
|
| 220 |
# Streaming allows tokens to be processed in real-time, reducing response latency.
|
| 221 |
#NMODEL
|
| 222 |
+
'''
|
| 223 |
summary_llm = ChatGoogleGenerativeAI(
|
| 224 |
model="gemini-2.0-flash", # or another Gemini model name
|
| 225 |
google_api_key=google_api_key, # your Gemini API key
|
| 226 |
temperature=0,
|
| 227 |
streaming=True
|
| 228 |
)
|
| 229 |
+
'''
|
| 230 |
|
| 231 |
|
| 232 |
+
summary_llm = ChatOpenAI(model='gpt-4o', temperature=0, streaming=True,api_key=openai_api_key)
|
| 233 |
|
| 234 |
|
| 235 |
# Create a ReAct agent
|