venkat charan commited on
Commit
b2c6294
·
verified ·
1 Parent(s): 77ae961

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -3,12 +3,15 @@ from langchain_core.prompts import ChatPromptTemplate
3
  import streamlit as st
4
  import os
5
  import openai
 
 
 
6
  llm = ChatOpenAI(temperature=0,model="gpt-3.5-turbo",max_token=100)
7
- openai.api_key = os.getenv("OPENAI_API_KEY")
8
 
9
 
10
 
11
- llm = ChatOpenAI(temperature=0, model="gpt-3.5-turbo", max_token=100)
12
 
13
 
14
  prompt = ChatPromptTemplate.from_messages([
 
3
  import streamlit as st
4
  import os
5
  import openai
6
+ from dotenv import load_dotenv
7
+
8
+ load_dotenv()
9
  llm = ChatOpenAI(temperature=0,model="gpt-3.5-turbo",max_token=100)
10
+ openai_api_key = os.getenv("OPENAI_API_KEY")
11
 
12
 
13
 
14
+ llm = ChatOpenAI(temperature=0, model="gpt-3.5-turbo", max_token=100,openai_api_key=openai_api_key)
15
 
16
 
17
  prompt = ChatPromptTemplate.from_messages([