Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -87,16 +87,26 @@ def run_gpt_3(dict_in, function=call3):
|
|
| 87 |
def call4(chunk):
|
| 88 |
response = openai.ChatCompletion.create(
|
| 89 |
model="gpt-3.5-turbo",
|
| 90 |
-
temperature=
|
| 91 |
messages=[
|
| 92 |
-
{"role": "system", "content": """You are a podcast summarizer. You will be given the gist of a long podcast,
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
|
| 101 |
"""},
|
| 102 |
{"role": "user", "content": str(chunk)}
|
|
|
|
| 87 |
def call4(chunk):
|
| 88 |
response = openai.ChatCompletion.create(
|
| 89 |
model="gpt-3.5-turbo",
|
| 90 |
+
temperature= .3,
|
| 91 |
messages=[
|
| 92 |
+
{"role": "system", "content": """You are a podcast summarizer. You will be given the chunked gist of a long podcast, each chunk will have it's timestamp in seconds.
|
| 93 |
+
Output in a python dictionary format whose structure is this:
|
| 94 |
+
{
|
| 95 |
+
hook: "the hook"
|
| 96 |
+
summary: "summary"
|
| 97 |
+
chapters: {
|
| 98 |
+
timestamp : "chapter"
|
| 99 |
+
timestamp : "chapter"
|
| 100 |
+
}
|
| 101 |
+
}when
|
| 102 |
+
hook: (Begin your podcast show notes with a gripping quote, anecdote, or question.)
|
| 103 |
+
Ex.One serendipitous relationship led him to start a company & change his life forever.
|
| 104 |
+
summary: Include main talking points and key phrases that will appeal to your
|
| 105 |
+
ideal listener. keep it concise.
|
| 106 |
+
chapters: analyze the whole podcast and break it down in 7 chapters. DO NOT make more than 7 chapters.
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
|
| 110 |
|
| 111 |
"""},
|
| 112 |
{"role": "user", "content": str(chunk)}
|