Spaces:
Runtime error
Runtime error
add model param gemini-pro
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ def run_llm(url, query):
|
|
66 |
llm = ChatOpenAI(temperature=0.5)
|
67 |
if selected_option == "gemini":
|
68 |
os.environ["GOOGLE_API_KEY"] = api_key
|
69 |
-
llm = ChatGoogleGenerativeAI(temperature=0.5)
|
70 |
# llm = ChatOpenAI(temperature=0.5)
|
71 |
query_website_tool = WebpageQATool(qa_chain=load_qa_with_sources_chain(llm))
|
72 |
result = query_website_tool._run(url, query) # Pass the URL and query as arguments
|
|
|
66 |
llm = ChatOpenAI(temperature=0.5)
|
67 |
if selected_option == "gemini":
|
68 |
os.environ["GOOGLE_API_KEY"] = api_key
|
69 |
+
llm = ChatGoogleGenerativeAI(model="gemini_pro",temperature=0.5)
|
70 |
# llm = ChatOpenAI(temperature=0.5)
|
71 |
query_website_tool = WebpageQATool(qa_chain=load_qa_with_sources_chain(llm))
|
72 |
result = query_website_tool._run(url, query) # Pass the URL and query as arguments
|