Spaces:
Sleeping
Sleeping
Update functions.py
Browse files- functions.py +4 -4
functions.py
CHANGED
@@ -127,8 +127,8 @@ def get_podcast_summary(podcast_transcript):
|
|
127 |
def get_podcast_guest(podcast_transcript):
|
128 |
'''Get guest name, professional title, organization name'''
|
129 |
|
130 |
-
completion =
|
131 |
-
model="gpt-
|
132 |
messages=[{"role": "user", "content": podcast_transcript}],
|
133 |
functions=[
|
134 |
|
@@ -161,7 +161,7 @@ def get_podcast_guest(podcast_transcript):
|
|
161 |
podcast_guest = ""
|
162 |
podcast_guest_org = ""
|
163 |
podcast_guest_title = ""
|
164 |
-
response_message = completion
|
165 |
|
166 |
if response_message.get("function_call"):
|
167 |
|
@@ -181,7 +181,7 @@ def get_podcast_highlights(podcast_transcript):
|
|
181 |
"""
|
182 |
request = instructPrompt + podcast_transcript
|
183 |
|
184 |
-
chatOutput =
|
185 |
messages=[{"role": "system", "content": "You are a helpful assistant."},
|
186 |
{"role": "user", "content": podcast_transcript}
|
187 |
]
|
|
|
127 |
def get_podcast_guest(podcast_transcript):
|
128 |
'''Get guest name, professional title, organization name'''
|
129 |
|
130 |
+
completion = client.chat.completions.create(
|
131 |
+
model="gpt-4-turbo-preview",
|
132 |
messages=[{"role": "user", "content": podcast_transcript}],
|
133 |
functions=[
|
134 |
|
|
|
161 |
podcast_guest = ""
|
162 |
podcast_guest_org = ""
|
163 |
podcast_guest_title = ""
|
164 |
+
response_message = completion.choices[0].message
|
165 |
|
166 |
if response_message.get("function_call"):
|
167 |
|
|
|
181 |
"""
|
182 |
request = instructPrompt + podcast_transcript
|
183 |
|
184 |
+
chatOutput = client.chat.completions.create(model="gpt-4-turbo-preview",
|
185 |
messages=[{"role": "system", "content": "You are a helpful assistant."},
|
186 |
{"role": "user", "content": podcast_transcript}
|
187 |
]
|