seiching commited on
Commit
7e749fe
1 Parent(s): 1f0bb94

加入第n段

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -32,7 +32,7 @@ def call_openai_api(openaiobj,transcription):
32
  messages=[
33
  {
34
  "role": "system",
35
- "content": "你是專業的會議紀錄製作員,請根據由語音辨識軟體將會議錄音所轉錄的逐字稿,也請注意逐字稿可能有錯,請以條列式,列出討論事項及結論,討論內容細節請略過,要用比較正式及容易閱讀的寫法,避免口語化"
36
  },
37
  {
38
  "role": "user",
@@ -86,9 +86,11 @@ def process_chunks(openaikeystr,inputtext):
86
  #openaikey.set_key(openaikeystr)
87
  #print('process_chunk',openaikey.get_key())
88
  chunks = split_into_chunks(text)
89
- response=''
 
90
  for chunk in chunks:
91
- response=response+call_openai_api(openaiobj,chunk)
 
92
  # response=response+call_openai_summary(openaiobj,chunk)
93
 
94
  #finalresponse=response+' summary \n\n' +call_openai_api(openaiobj,response)
 
32
  messages=[
33
  {
34
  "role": "system",
35
+ "content": "你是專業的會議紀錄製作員,請根據由語音辨識軟體將會議錄音所轉錄的逐字稿,也請注意逐字稿可能有錯,討論內容細節請略過,請以條列式列出會議決議,並要用比較正式及容易閱讀的寫法,避免口語化"
36
  },
37
  {
38
  "role": "user",
 
86
  #openaikey.set_key(openaikeystr)
87
  #print('process_chunk',openaikey.get_key())
88
  chunks = split_into_chunks(text)
89
+ response='第1段'
90
+ i=1
91
  for chunk in chunks:
92
+ i=i+1
93
+ response=response+call_openai_api(openaiobj,chunk)+'\n 第' +str(i)+'段\n'
94
  # response=response+call_openai_summary(openaiobj,chunk)
95
 
96
  #finalresponse=response+' summary \n\n' +call_openai_api(openaiobj,response)