fix6
Browse files
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 |
-
|
| 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
|