jeon commited on
Commit
3311d51
โ€ข
1 Parent(s): cdedab9
Files changed (1) hide show
  1. app.py +2 -12
app.py CHANGED
@@ -19,17 +19,13 @@ def get_completion_from_messages(input, model="gpt-3.5-turbo", temperature=0.8):
19
  messages = [
20
  {'role': 'system', 'content': '๋„ˆ๋Š” ์ž๊ธฐ์†Œ๊ฐœ์„œ์— ๊ธฐ๋ฐ˜ํ•˜์—ฌ ์งˆ๋ฌธ์„ ํ•˜๋Š” ๋ฉด์ ‘๊ด€์ด์•ผ.\
21
  ๋งŒ์•ฝ ์ „๋ฌธ์šฉ์–ด๊ฐ€ ์žˆ๋‹ค๋ฉด ๊ผฌ๋ฆฌ์งˆ๋ฌธํ•ด์ค˜'},
22
- {
23
- "role": "user",
24
- "content": input
25
- }
26
- ]
27
  response = openai.ChatCompletion.create(
28
  model=model,
29
  messages=messages,
30
  temperature=temperature, # this is the degree of randomness of the model's output
31
  )
32
- # print(str(response.choices[0].message))
33
  return response.choices[0].message["content"]
34
 
35
 
@@ -42,12 +38,6 @@ def get_completion_from_messages(input, model="gpt-3.5-turbo", temperature=0.8):
42
  #get completion ํ†ต๊ณผ ์‹œ์ผœ์„œ ๋‹ต๋ณ€์–ป์Œ
43
  #์ด๋•Œ ์—ญํ•  ๋ถ„๋‹ด ๋ฐ ํ”„๋กฌํ”„ํŠธ ์—”์ง€๋‹ˆ์–ด๋ง ์ง„ํ–‰
44
  ####
45
- class Interviewer:
46
- def __init__(self):
47
- self.history = []
48
-
49
-
50
-
51
  class Interviewer:
52
  def __init__(self):
53
  # Initialize the ChatBot class with an empty history
 
19
  messages = [
20
  {'role': 'system', 'content': '๋„ˆ๋Š” ์ž๊ธฐ์†Œ๊ฐœ์„œ์— ๊ธฐ๋ฐ˜ํ•˜์—ฌ ์งˆ๋ฌธ์„ ํ•˜๋Š” ๋ฉด์ ‘๊ด€์ด์•ผ.\
21
  ๋งŒ์•ฝ ์ „๋ฌธ์šฉ์–ด๊ฐ€ ์žˆ๋‹ค๋ฉด ๊ผฌ๋ฆฌ์งˆ๋ฌธํ•ด์ค˜'},
22
+ {"role": "user","content": input }]
 
 
 
 
23
  response = openai.ChatCompletion.create(
24
  model=model,
25
  messages=messages,
26
  temperature=temperature, # this is the degree of randomness of the model's output
27
  )
28
+ print(111111)
29
  return response.choices[0].message["content"]
30
 
31
 
 
38
  #get completion ํ†ต๊ณผ ์‹œ์ผœ์„œ ๋‹ต๋ณ€์–ป์Œ
39
  #์ด๋•Œ ์—ญํ•  ๋ถ„๋‹ด ๋ฐ ํ”„๋กฌํ”„ํŠธ ์—”์ง€๋‹ˆ์–ด๋ง ์ง„ํ–‰
40
  ####
 
 
 
 
 
 
41
  class Interviewer:
42
  def __init__(self):
43
  # Initialize the ChatBot class with an empty history