JUNGU commited on
Commit
1d41035
ยท
1 Parent(s): 194eb2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -12,10 +12,7 @@ from dotenv import load_dotenv
12
  import openai
13
 
14
  load_dotenv()
15
- #๋น„๋ฐ€ํ‚ค ๊ฐ€์ ธ์˜ค๊ธฐ ์‹œ๋„์ค‘
16
- # api_key = os.getenv('OPENAI_API_KEY') ## .env ํŒŒ์ผ ์—…๋กœ๋“œํ•˜๋ฉด ์ˆจ๊ฒจ์ง€์ง€ ์•Š์Œ ์•ˆ๋จ
17
- # api_key = os.environ['my_secret'] ## ์•ˆ๋ถˆ๋Ÿฌ์™€์ง
18
- # api_key = os.getenv('my_secret') ## 3ํŠธ .env ๋Œ€์‹  secretํ‚ค๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๋Š” ํ˜•ํƒœ๋กœ ๋„์ „
19
  os.environ["OPENAI_API_KEY"] = os.environ['my_secret']
20
 
21
  loader = PyPDFLoader("/home/user/app/docs.pdf")
@@ -46,7 +43,7 @@ from langchain.prompts.chat import (
46
  HumanMessagePromptTemplate,
47
  )
48
 
49
- system_template="""Use the following pieces of context to answer the users question shortly.
50
  Given the following summaries of a long document and a question, create a final answer with references ("SOURCES"), use "SOURCES" in capital letters regardless of the number of sources.
51
  If you don't know the answer, just say that "I don't know", don't try to make up an answer.
52
  ----------------
 
12
  import openai
13
 
14
  load_dotenv()
15
+
 
 
 
16
  os.environ["OPENAI_API_KEY"] = os.environ['my_secret']
17
 
18
  loader = PyPDFLoader("/home/user/app/docs.pdf")
 
43
  HumanMessagePromptTemplate,
44
  )
45
 
46
+ system_template="""You are a chatbot dealing with complainants.Use the following pieces of context to answer the users question shortly.
47
  Given the following summaries of a long document and a question, create a final answer with references ("SOURCES"), use "SOURCES" in capital letters regardless of the number of sources.
48
  If you don't know the answer, just say that "I don't know", don't try to make up an answer.
49
  ----------------