zaephaer23 commited on
Commit
756cf27
1 Parent(s): 7d68314

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,5 +1,5 @@
1
  # Simple QnA Chatbot
2
- from langchain.llms import OpenAI
3
  from dotenv import load_dotenv
4
  from langchain_google_genai import GoogleGenerativeAI
5
  import streamlit as st
@@ -10,9 +10,9 @@ load_dotenv() # take environment variables from .env.file
10
  # Function to load OpenAI and get response
11
  def get_openai_response(query_prompt):
12
  #llm = OpenAI(openai_api_key = os.getenv("OPENAI_API_KEY"), model = "gpt-3.5-turbo", temperature=0.9)
13
- #llm = OpenAI(openai_api_key = os.getenv("OPENAI_API_KEY"), temperature=0.9)
14
- llmGemini = GoogleGenerativeAI(gemini_api_key=os.environ["GOOGLE_API_KEY"],model="gemini-pro", temperature=0.7)
15
- #response = llm(query_prompt)
16
  response = llmGemini(query_prompt)
17
  return response
18
 
 
1
  # Simple QnA Chatbot
2
+ from langchain_community.llms import OpenAI
3
  from dotenv import load_dotenv
4
  from langchain_google_genai import GoogleGenerativeAI
5
  import streamlit as st
 
10
  # Function to load OpenAI and get response
11
  def get_openai_response(query_prompt):
12
  #llm = OpenAI(openai_api_key = os.getenv("OPENAI_API_KEY"), model = "gpt-3.5-turbo", temperature=0.9)
13
+ llm = OpenAI(openai_api_key = os.getenv("OPENAI_API_KEY"), temperature=0.9)
14
+ #llmGemini = GoogleGenerativeAI(gemini_api_key=os.environ["GOOGLE_API_KEY"],model="gemini-pro", temperature=0.7)
15
+ response = llm(query_prompt)
16
  response = llmGemini(query_prompt)
17
  return response
18