Milad Alshomary
commited on
Commit
·
f18e0e7
1
Parent(s):
87671d9
updates
Browse files- utils/interp_space_utils.py +5 -1
- utils/llm_feat_utils.py +5 -3
utils/interp_space_utils.py
CHANGED
|
@@ -478,9 +478,13 @@ def identify_style_features(author_texts: list[str], author_names: list[str], ma
|
|
| 478 |
|
| 479 |
{author_texts}
|
| 480 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 481 |
def _make_call():
|
| 482 |
response = client.chat.completions.create(
|
| 483 |
-
model="gpt-4o
|
| 484 |
messages=[
|
| 485 |
{"role": "assistant", "content": "You are a forensic linguist who knows how to analyze linguistic and stylometric similarites between texts."},
|
| 486 |
{"role": "user", "content": prompt}
|
|
|
|
| 478 |
|
| 479 |
{author_texts}
|
| 480 |
"""
|
| 481 |
+
|
| 482 |
+
print('==================>>>>>>>>>>')
|
| 483 |
+
print(prompt)
|
| 484 |
+
print('==================>>>>>>>>>>')
|
| 485 |
def _make_call():
|
| 486 |
response = client.chat.completions.create(
|
| 487 |
+
model="gpt-4o",
|
| 488 |
messages=[
|
| 489 |
{"role": "assistant", "content": "You are a forensic linguist who knows how to analyze linguistic and stylometric similarites between texts."},
|
| 490 |
{"role": "user", "content": prompt}
|
utils/llm_feat_utils.py
CHANGED
|
@@ -52,10 +52,12 @@ def generate_feature_spans(client, text: str, features: list[str]) -> str:
|
|
| 52 |
Style Features:
|
| 53 |
{features}
|
| 54 |
"""
|
|
|
|
|
|
|
|
|
|
| 55 |
response = client.chat.completions.create(
|
| 56 |
-
model="gpt-4o
|
| 57 |
-
messages=[{"role":"user","content":prompt}]
|
| 58 |
-
temperature=0.3,
|
| 59 |
)
|
| 60 |
content = response.choices[0].message.content
|
| 61 |
content = content.replace('```json', '').replace('```','')
|
|
|
|
| 52 |
Style Features:
|
| 53 |
{features}
|
| 54 |
"""
|
| 55 |
+
print('==================>>>>>>>>>>')
|
| 56 |
+
print(prompt)
|
| 57 |
+
print('==================>>>>>>>>>>')
|
| 58 |
response = client.chat.completions.create(
|
| 59 |
+
model="gpt-4o",
|
| 60 |
+
messages=[{"role":"user","content":prompt}]
|
|
|
|
| 61 |
)
|
| 62 |
content = response.choices[0].message.content
|
| 63 |
content = content.replace('```json', '').replace('```','')
|