Spaces:
Running
Running
naveenvenkatesh
commited on
Commit
•
10bbb62
1
Parent(s):
4683caa
Update headings_extractor.py
Browse files- headings_extractor.py +10 -6
headings_extractor.py
CHANGED
@@ -45,12 +45,16 @@ class HeadingsExtractor:
|
|
45 |
]
|
46 |
|
47 |
# Call OpenAI GPT-3.5-turbo
|
48 |
-
chat_completion =
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
54 |
response = chat_completion.choices[0].message.content
|
55 |
return response
|
56 |
|
|
|
45 |
]
|
46 |
|
47 |
# Call OpenAI GPT-3.5-turbo
|
48 |
+
chat_completion =openai.ChatCompletion.create(
|
49 |
+
engine="ChatGPT",
|
50 |
+
messages = conversation,
|
51 |
+
temperature=0.7,
|
52 |
+
max_tokens=800,
|
53 |
+
top_p=0.95,
|
54 |
+
frequency_penalty=0,
|
55 |
+
presence_penalty=0,
|
56 |
+
stop=None
|
57 |
+
)
|
58 |
response = chat_completion.choices[0].message.content
|
59 |
return response
|
60 |
|