Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -188,15 +188,15 @@ Extract the following information clearly and systematically:
|
|
| 188 |
6. Sentence/paragraph length and complexity.
|
| 189 |
7. Any special legal phrases or terminology patterns.
|
| 190 |
8. Any notes on length and overall flow.
|
| 191 |
-
Return a
|
| 192 |
Do not rewrite the draft, only analyze it."""
|
| 193 |
try:
|
| 194 |
resp = openai_client.chat.completions.create(
|
| 195 |
-
model="gpt-
|
| 196 |
messages=[{"role": "system", "content": system_prompt},
|
| 197 |
{"role": "user", "content": ref_text[:40000]}],
|
| 198 |
-
max_completion_tokens=
|
| 199 |
-
|
| 200 |
)
|
| 201 |
return resp.choices[0].message.content.strip()
|
| 202 |
except Exception as e:
|
|
|
|
| 188 |
6. Sentence/paragraph length and complexity.
|
| 189 |
7. Any special legal phrases or terminology patterns.
|
| 190 |
8. Any notes on length and overall flow.
|
| 191 |
+
Return a report that can be given as instructions to another model so it can treat this document as template to write a new legal draft based on this template (in terms of style, language, tone, length, format).
|
| 192 |
Do not rewrite the draft, only analyze it."""
|
| 193 |
try:
|
| 194 |
resp = openai_client.chat.completions.create(
|
| 195 |
+
model="gpt-4o-mini",
|
| 196 |
messages=[{"role": "system", "content": system_prompt},
|
| 197 |
{"role": "user", "content": ref_text[:40000]}],
|
| 198 |
+
max_completion_tokens=1000,
|
| 199 |
+
temperature = 0.1
|
| 200 |
)
|
| 201 |
return resp.choices[0].message.content.strip()
|
| 202 |
except Exception as e:
|