Spaces:
Running
Running
Update posts_categorization.py
Browse files- posts_categorization.py +2 -2
posts_categorization.py
CHANGED
@@ -40,7 +40,7 @@ def summarize_post(text):
|
|
40 |
response = client.chat.completions.create(
|
41 |
model=PRIMARY_SUMMARIZER_MODEL,
|
42 |
response_model=SummaryOutput,
|
43 |
-
messages=
|
44 |
{"role": "system", "content": "You are a precise summarizer. Only return a JSON object with a 'summary' string."},
|
45 |
{"role": "user", "content": prompt}
|
46 |
],
|
@@ -54,7 +54,7 @@ def summarize_post(text):
|
|
54 |
response = client.chat.completions.create(
|
55 |
model=FALLBACK_SUMMARIZER_MODEL,
|
56 |
response_model=SummaryOutput,
|
57 |
-
messages=
|
58 |
{"role": "system", "content": "You are a precise summarizer. Only return a JSON object with a 'summary' string."},
|
59 |
{"role": "user", "content": prompt}
|
60 |
],
|
|
|
40 |
response = client.chat.completions.create(
|
41 |
model=PRIMARY_SUMMARIZER_MODEL,
|
42 |
response_model=SummaryOutput,
|
43 |
+
messages=[
|
44 |
{"role": "system", "content": "You are a precise summarizer. Only return a JSON object with a 'summary' string."},
|
45 |
{"role": "user", "content": prompt}
|
46 |
],
|
|
|
54 |
response = client.chat.completions.create(
|
55 |
model=FALLBACK_SUMMARIZER_MODEL,
|
56 |
response_model=SummaryOutput,
|
57 |
+
messages=[
|
58 |
{"role": "system", "content": "You are a precise summarizer. Only return a JSON object with a 'summary' string."},
|
59 |
{"role": "user", "content": prompt}
|
60 |
],
|