Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions real_intent/analyze/insights/many.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def _analyze(self, pii_md5s: list[MD5WithPII]) -> str:

@retry_with_backoff()
def generate_insights():
return self.openai_client.beta.chat.completions.parse(
model="gpt-4o-mini",
return self.openai_client.chat.completions.parse(
model="gpt-5-mini",
messages=[
{
"role": "system",
Expand All @@ -93,11 +93,7 @@ def generate_insights():
"content": csv_data
}
],
max_tokens=4095,
temperature=1,
top_p=1,
frequency_penalty=0,
presence_penalty=0,
response_format=LeadInsights
)

Expand Down Expand Up @@ -257,8 +253,8 @@ def _analyze(self, pii_md5s: list[MD5WithPII]) -> str:

@retry_with_backoff()
def generate_insights():
return self.openai_client.beta.chat.completions.parse(
model="gpt-4o-mini",
return self.openai_client.chat.completions.parse(
model="gpt-5-mini",
messages=[
{
"role": "system",
Expand All @@ -273,11 +269,7 @@ def generate_insights():
)
}
],
max_tokens=4095,
temperature=1,
top_p=1,
frequency_penalty=0,
presence_penalty=0,
response_format=ValidatedLeadInsights
)

Expand Down
8 changes: 2 additions & 6 deletions real_intent/analyze/insights/per_lead.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def _analyze_one(self, pii_md5: MD5WithPII) -> LeadInsight:

@retry_with_backoff()
def generate_insight():
return self.openai_client.beta.chat.completions.parse(
model="gpt-4o-mini",
return self.openai_client.chat.completions.parse(
model="gpt-5-mini",
messages=[
{
"role": "system",
Expand All @@ -105,11 +105,7 @@ def generate_insight():
)
}
],
max_tokens=2000,
temperature=1,
top_p=1,
frequency_penalty=0,
presence_penalty=0,
response_format=LeadInsight
)

Expand Down
6 changes: 1 addition & 5 deletions real_intent/deliver/followupboss/ai_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def _prepare_event_data(self, md5_with_pii: MD5WithPII) -> dict:
# Match the custom fields with the PII data
log("debug", "Sending request to OpenAI for field mapping")
response = self.openai_client.chat.completions.create(
model="gpt-4.1-mini",
model="gpt-5-mini",
messages=[
{
"role": "system",
Expand All @@ -292,11 +292,7 @@ def _prepare_event_data(self, md5_with_pii: MD5WithPII) -> dict:
)
}
],
max_tokens=4095,
temperature=0.7,
top_p=1,
frequency_penalty=0,
presence_penalty=0,
response_format={"type": "json_object"}
)

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pandas
requests

logfire>=3.16.2
openai==1.97.0
openai==2.14.0
reportlab>=4.4.2

python-dotenv
Expand Down