Spaces:
Sleeping
Sleeping
venkat charan
commited on
Update app.py
Browse files
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 |
-
|
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([
|