dhisana 0.0.1.dev293__tar.gz → 0.0.1.dev294__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/PKG-INFO +1 -1
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/setup.py +1 -1
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/compose_search_query.py +2 -2
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/dataframe_tools.py +2 -2
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/enrich_lead_information.py +3 -3
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/generate_custom_message.py +2 -2
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/generate_email.py +14 -14
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/generate_email_response.py +1 -1
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/generate_linkedin_connect_message.py +12 -12
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/generate_linkedin_response_message.py +2 -2
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/generate_structured_output_internal.py +3 -3
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/openai_assistant_and_file_utils.py +3 -3
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/openai_helpers.py +2 -2
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/serpapi_search_tools.py +2 -2
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/test_connect.py +1 -1
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/trasform_json.py +1 -1
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/workflow/test.py +1 -1
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana.egg-info/PKG-INFO +1 -1
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/README.md +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/pyproject.toml +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/setup.cfg +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/__init__.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/cli/__init__.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/cli/cli.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/cli/datasets.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/cli/models.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/cli/predictions.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/schemas/__init__.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/schemas/common.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/schemas/sales.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/ui/__init__.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/ui/components.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/__init__.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/add_mapping.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/agent_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/apollo_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/assistant_tool_tag.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/built_with_api_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/cache_output_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/cache_output_tools_local.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/check_email_validity_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/check_for_intent_signal.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/check_linkedin_url_validity.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/clay_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/clean_properties.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/company_utils.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/compose_salesnav_query.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/compose_three_step_workflow.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/composite_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/domain_parser.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/email_body_utils.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/email_parse_helpers.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/email_provider.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/extract_email_content_for_llm.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/fetch_openai_config.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/field_validators.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/g2_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/generate_content.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/generate_flow.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/generate_leads_salesnav.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/google_custom_search.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/google_oauth_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/google_workspace_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/hubspot_clearbit.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/hubspot_crm_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/instantly_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/linkedin_crawler.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/lusha_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/mailgun_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/mailreach_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/microsoft365_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/openapi_spec_to_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/openapi_tool/__init__.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/openapi_tool/api_models.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/openapi_tool/convert_openai_spec_to_tool.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/openapi_tool/openapi_tool.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/parse_linkedin_messages_txt.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/profile.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/proxy_curl_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/proxycurl_search_leads.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/python_function_to_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/research_lead.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/sales_navigator_crawler.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/salesforce_crm_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/search_router.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/search_router_jobs.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/sendgrid_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/serarch_router_local_business.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/serpapi_additional_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/serpapi_google_jobs.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/serpapi_google_search.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/serpapi_local_business_search.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/serperdev_google_jobs.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/serperdev_local_business.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/serperdev_search.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/smtp_email_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/web_download_parse_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/workflow_code_model.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/zoominfo_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/workflow/__init__.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/workflow/agent.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/workflow/flow.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/workflow/task.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana.egg-info/SOURCES.txt +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana.egg-info/dependency_links.txt +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana.egg-info/entry_points.txt +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana.egg-info/requires.txt +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana.egg-info/top_level.txt +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_agent_tools.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_apollo_company_search.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_apollo_lead_search.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_connectivity.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_email_body_utils.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_google_document.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_hubspot_call_logs.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_linkedin_serper.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_mailreach.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_mcp_connectivity.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_normalize_graph_datetime.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_proxycurl_get_company_search_id.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_proxycurl_job_count.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_reply_thread_fallback.py +0 -0
- {dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/tests/test_structured_output_with_mcp.py +0 -0
|
@@ -472,7 +472,7 @@ Output must be valid JSON, e.g.:
|
|
|
472
472
|
prompt=prompt,
|
|
473
473
|
response_format=TechnologyUsedCheck,
|
|
474
474
|
effort="high",
|
|
475
|
-
model="gpt-5.
|
|
475
|
+
model="gpt-5.4",
|
|
476
476
|
tool_config=tool_config
|
|
477
477
|
)
|
|
478
478
|
|
|
@@ -534,7 +534,7 @@ Output must be valid JSON, e.g.:
|
|
|
534
534
|
prompt=prompt,
|
|
535
535
|
response_format=TechnologyAndRoleCheck,
|
|
536
536
|
effort="high",
|
|
537
|
-
model="gpt-5.
|
|
537
|
+
model="gpt-5.4",
|
|
538
538
|
tool_config=tool_config
|
|
539
539
|
)
|
|
540
540
|
|
|
@@ -33,13 +33,13 @@ class PandasQuery(BaseModel):
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
@assistant_tool
|
|
36
|
-
async def get_structured_output(message: str, response_type, model: str = "gpt-5.
|
|
36
|
+
async def get_structured_output(message: str, response_type, model: str = "gpt-5.4"):
|
|
37
37
|
"""
|
|
38
38
|
Asynchronously retrieves structured output from the OpenAI API based on the input message.
|
|
39
39
|
|
|
40
40
|
:param message: The input message to be processed by the OpenAI API.
|
|
41
41
|
:param response_type: The expected format of the response (e.g., JSON).
|
|
42
|
-
:param model: The model to be used for processing the input message. Defaults to "gpt-5.
|
|
42
|
+
:param model: The model to be used for processing the input message. Defaults to "gpt-5.4".
|
|
43
43
|
:return: A tuple containing the parsed response and a status string ('SUCCESS' or 'FAIL').
|
|
44
44
|
"""
|
|
45
45
|
try:
|
|
@@ -163,7 +163,7 @@ async def get_clean_lead_info_with_llm(lead_info_str: str, tool_config: Optional
|
|
|
163
163
|
lead_info, status = await get_structured_output_internal(
|
|
164
164
|
prompt,
|
|
165
165
|
BasicLeadInformation,
|
|
166
|
-
model="gpt-5.
|
|
166
|
+
model="gpt-5.4",
|
|
167
167
|
tool_config=tool_config
|
|
168
168
|
)
|
|
169
169
|
if status != "SUCCESS":
|
|
@@ -511,7 +511,7 @@ async def get_user_linkedin_url_from_github_profile(
|
|
|
511
511
|
response, status = await get_structured_output_internal(
|
|
512
512
|
instructions,
|
|
513
513
|
UserInfoFromGithubProfileId,
|
|
514
|
-
model="gpt-5.
|
|
514
|
+
model="gpt-5.4",
|
|
515
515
|
use_web_search=True,
|
|
516
516
|
tool_config=tool_config
|
|
517
517
|
)
|
|
@@ -1034,7 +1034,7 @@ async def get_company_domain_from_llm_web_search(
|
|
|
1034
1034
|
response, status = await get_structured_output_internal(
|
|
1035
1035
|
instructions,
|
|
1036
1036
|
CompanyInfoFromName,
|
|
1037
|
-
model="gpt-5.
|
|
1037
|
+
model="gpt-5.4",
|
|
1038
1038
|
use_web_search=True,
|
|
1039
1039
|
tool_config=tool_config
|
|
1040
1040
|
)
|
|
@@ -184,7 +184,7 @@ async def generate_custom_message_copy(
|
|
|
184
184
|
prompt=initial_prompt,
|
|
185
185
|
response_format=CustomMessageCopy,
|
|
186
186
|
vector_store_id=vector_store_id,
|
|
187
|
-
model="gpt-5.
|
|
187
|
+
model="gpt-5.4",
|
|
188
188
|
tool_config=tool_config,
|
|
189
189
|
use_cache=message_context.message_instructions.use_cache if message_context.message_instructions else True
|
|
190
190
|
)
|
|
@@ -193,7 +193,7 @@ async def generate_custom_message_copy(
|
|
|
193
193
|
initial_response, initial_status = await get_structured_output_internal(
|
|
194
194
|
prompt=initial_prompt,
|
|
195
195
|
response_format=CustomMessageCopy,
|
|
196
|
-
model="gpt-5.
|
|
196
|
+
model="gpt-5.4",
|
|
197
197
|
tool_config=tool_config,
|
|
198
198
|
use_cache=message_context.message_instructions.use_cache if message_context.message_instructions else True
|
|
199
199
|
)
|
|
@@ -15,8 +15,8 @@ from pydantic import BaseModel, ConfigDict
|
|
|
15
15
|
# ---------------------------------------------------------------------------------------
|
|
16
16
|
# CONSTANTS
|
|
17
17
|
# ---------------------------------------------------------------------------------------
|
|
18
|
-
DEFAULT_OPENAI_MODEL = "gpt-4
|
|
19
|
-
DEFAULT_EMAIL_GEN_MODEL = "gpt-5.
|
|
18
|
+
DEFAULT_OPENAI_MODEL = "gpt-5.4" # Larger context length - used for generating instructions
|
|
19
|
+
DEFAULT_EMAIL_GEN_MODEL = "gpt-5.4" # Better content generation - used for generating email
|
|
20
20
|
|
|
21
21
|
# -----------------------------------------------------------------------------
|
|
22
22
|
# Email Generation Instructions schema (intermediate step)
|
|
@@ -86,7 +86,7 @@ FRAMEWORK_VARIATIONS = [
|
|
|
86
86
|
]
|
|
87
87
|
|
|
88
88
|
# -----------------------------------------------------------------------------
|
|
89
|
-
# Step 1: Generate email instructions using gpt-4
|
|
89
|
+
# Step 1: Generate email instructions using gpt-5.4 (larger context)
|
|
90
90
|
# -----------------------------------------------------------------------------
|
|
91
91
|
async def generate_email_instructions(
|
|
92
92
|
email_context: ContentGenerationContext,
|
|
@@ -96,7 +96,7 @@ async def generate_email_instructions(
|
|
|
96
96
|
) -> EmailGenerationInstructions:
|
|
97
97
|
"""
|
|
98
98
|
Step 1 of 2-step email generation process.
|
|
99
|
-
Uses gpt-4
|
|
99
|
+
Uses gpt-5.4 (larger context length) to process all context and generate
|
|
100
100
|
concise instructions for email generation.
|
|
101
101
|
"""
|
|
102
102
|
cleaned_context = cleanup_email_context(email_context)
|
|
@@ -174,7 +174,7 @@ OUTPUT FIELDS:
|
|
|
174
174
|
instructions_response = None
|
|
175
175
|
instructions_status = ""
|
|
176
176
|
|
|
177
|
-
# Generate instructions using gpt-4
|
|
177
|
+
# Generate instructions using gpt-5.4 (larger context)
|
|
178
178
|
if vector_store_id:
|
|
179
179
|
instructions_response, instructions_status = await get_structured_output_with_assistant_and_vector_store(
|
|
180
180
|
prompt=instructions_prompt,
|
|
@@ -200,7 +200,7 @@ OUTPUT FIELDS:
|
|
|
200
200
|
|
|
201
201
|
|
|
202
202
|
# -----------------------------------------------------------------------------
|
|
203
|
-
# Step 2: Generate email using gpt-5.
|
|
203
|
+
# Step 2: Generate email using gpt-5.4 (better content generation)
|
|
204
204
|
# -----------------------------------------------------------------------------
|
|
205
205
|
async def generate_email_from_instructions(
|
|
206
206
|
instructions: EmailGenerationInstructions,
|
|
@@ -215,7 +215,7 @@ async def generate_email_from_instructions(
|
|
|
215
215
|
) -> EmailCopy:
|
|
216
216
|
"""
|
|
217
217
|
Step 2 of 2-step email generation process.
|
|
218
|
-
Uses gpt-5.
|
|
218
|
+
Uses gpt-5.4 (better content generation) to generate the email
|
|
219
219
|
from the condensed instructions.
|
|
220
220
|
"""
|
|
221
221
|
allow_html = getattr(message_instructions, "allow_html", False)
|
|
@@ -323,7 +323,7 @@ ADDITIONAL REQUIREMENTS:
|
|
|
323
323
|
- Do not use em dash in the output.
|
|
324
324
|
"""
|
|
325
325
|
|
|
326
|
-
# Generate email using gpt-5.
|
|
326
|
+
# Generate email using gpt-5.4 (better content generation)
|
|
327
327
|
email_response, email_status = await get_structured_output_internal(
|
|
328
328
|
prompt=email_prompt,
|
|
329
329
|
response_format=EmailCopy,
|
|
@@ -350,17 +350,17 @@ async def generate_personalized_email_copy(
|
|
|
350
350
|
"""
|
|
351
351
|
Generate a personalized email using a 2-step process:
|
|
352
352
|
|
|
353
|
-
Step 1: Use gpt-4
|
|
353
|
+
Step 1: Use gpt-5.4 (larger context length) to process all context and generate
|
|
354
354
|
concise instructions for email generation.
|
|
355
355
|
|
|
356
|
-
Step 2: Use gpt-5.
|
|
356
|
+
Step 2: Use gpt-5.4 (better content generation) to generate the actual
|
|
357
357
|
email from the condensed instructions.
|
|
358
358
|
|
|
359
|
-
This approach leverages gpt-4
|
|
360
|
-
lead/campaign data, and gpt-5.
|
|
359
|
+
This approach leverages gpt-5.4's larger context window to process extensive
|
|
360
|
+
lead/campaign data, and gpt-5.4's superior content generation for the
|
|
361
361
|
final email output.
|
|
362
362
|
"""
|
|
363
|
-
# Step 1: Generate instructions using gpt-4
|
|
363
|
+
# Step 1: Generate instructions using gpt-5.4
|
|
364
364
|
instructions = await generate_email_instructions(
|
|
365
365
|
email_context=email_context,
|
|
366
366
|
message_instructions=message_instructions,
|
|
@@ -368,7 +368,7 @@ async def generate_personalized_email_copy(
|
|
|
368
368
|
tool_config=tool_config,
|
|
369
369
|
)
|
|
370
370
|
|
|
371
|
-
# Step 2: Generate email using gpt-5.
|
|
371
|
+
# Step 2: Generate email using gpt-5.4
|
|
372
372
|
cleaned_context = cleanup_email_context(email_context)
|
|
373
373
|
campaign_data = cleaned_context.campaign_context or CampaignContext()
|
|
374
374
|
html_note = (
|
|
@@ -19,7 +19,7 @@ from dhisana.utils.generate_structured_output_internal import (
|
|
|
19
19
|
# ---------------------------------------------------------------------------------------
|
|
20
20
|
# CONSTANTS
|
|
21
21
|
# ---------------------------------------------------------------------------------------
|
|
22
|
-
DEFAULT_TRIAGE_MODEL = "gpt-4
|
|
22
|
+
DEFAULT_TRIAGE_MODEL = "gpt-5.4"
|
|
23
23
|
|
|
24
24
|
# ---------------------------------------------------------------------------------------
|
|
25
25
|
# MODEL
|
{dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/generate_linkedin_connect_message.py
RENAMED
|
@@ -24,8 +24,8 @@ from dhisana.utils.assistant_tool_tag import assistant_tool
|
|
|
24
24
|
# ---------------------------------------------------------------------------------------
|
|
25
25
|
# CONSTANTS
|
|
26
26
|
# ---------------------------------------------------------------------------------------
|
|
27
|
-
DEFAULT_OPENAI_MODEL = "gpt-4
|
|
28
|
-
DEFAULT_EMAIL_GEN_MODEL = "gpt-5.
|
|
27
|
+
DEFAULT_OPENAI_MODEL = "gpt-5.4" # Larger context length - used for generating instructions
|
|
28
|
+
DEFAULT_EMAIL_GEN_MODEL = "gpt-5.4" # Better content generation - used for generating message
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
# ----------------------------------------------------------------------
|
|
@@ -83,7 +83,7 @@ LINKEDIN_FRAMEWORK_VARIATIONS = [
|
|
|
83
83
|
]
|
|
84
84
|
|
|
85
85
|
# ----------------------------------------------------------------------
|
|
86
|
-
# Step 1: Generate LinkedIn instructions using gpt-4
|
|
86
|
+
# Step 1: Generate LinkedIn instructions using gpt-5.4 (larger context)
|
|
87
87
|
# ----------------------------------------------------------------------
|
|
88
88
|
async def generate_linkedin_instructions(
|
|
89
89
|
linkedin_context: ContentGenerationContext,
|
|
@@ -92,7 +92,7 @@ async def generate_linkedin_instructions(
|
|
|
92
92
|
) -> LinkedInGenerationInstructions:
|
|
93
93
|
"""
|
|
94
94
|
Step 1 of 2-step LinkedIn message generation process.
|
|
95
|
-
Uses gpt-4
|
|
95
|
+
Uses gpt-5.4 (larger context length) to process all context and generate
|
|
96
96
|
concise instructions for message generation.
|
|
97
97
|
"""
|
|
98
98
|
cleaned_context = cleanup_linkedin_context(linkedin_context)
|
|
@@ -149,7 +149,7 @@ OUTPUT FIELDS:
|
|
|
149
149
|
instructions_response = None
|
|
150
150
|
instructions_status = ""
|
|
151
151
|
|
|
152
|
-
# Generate instructions using gpt-4
|
|
152
|
+
# Generate instructions using gpt-5.4 (larger context)
|
|
153
153
|
if vector_store_id:
|
|
154
154
|
instructions_response, instructions_status = await get_structured_output_with_assistant_and_vector_store(
|
|
155
155
|
prompt=instructions_prompt,
|
|
@@ -175,7 +175,7 @@ OUTPUT FIELDS:
|
|
|
175
175
|
|
|
176
176
|
|
|
177
177
|
# ----------------------------------------------------------------------
|
|
178
|
-
# Step 2: Generate LinkedIn message using gpt-5.
|
|
178
|
+
# Step 2: Generate LinkedIn message using gpt-5.4 (better content)
|
|
179
179
|
# ----------------------------------------------------------------------
|
|
180
180
|
async def generate_linkedin_from_instructions(
|
|
181
181
|
instructions: LinkedInGenerationInstructions,
|
|
@@ -188,7 +188,7 @@ async def generate_linkedin_from_instructions(
|
|
|
188
188
|
) -> LinkedInConnectMessage:
|
|
189
189
|
"""
|
|
190
190
|
Step 2 of 2-step LinkedIn message generation process.
|
|
191
|
-
Uses gpt-5.
|
|
191
|
+
Uses gpt-5.4 (better content generation) to generate the message
|
|
192
192
|
from the condensed instructions.
|
|
193
193
|
"""
|
|
194
194
|
# Build sender/recipient name block for redundancy (guards against step-1 errors)
|
|
@@ -265,7 +265,7 @@ OUTPUT REQUIREMENTS:
|
|
|
265
265
|
- Do not use em dash in the output.
|
|
266
266
|
"""
|
|
267
267
|
|
|
268
|
-
# Generate message using gpt-5.
|
|
268
|
+
# Generate message using gpt-5.4 (better content generation)
|
|
269
269
|
message_response, message_status = await get_structured_output_internal(
|
|
270
270
|
prompt=message_prompt,
|
|
271
271
|
response_format=LinkedInConnectMessage,
|
|
@@ -291,24 +291,24 @@ async def generate_personalized_linkedin_copy(
|
|
|
291
291
|
"""
|
|
292
292
|
Generate a personalized LinkedIn connection message using a 2-step process:
|
|
293
293
|
|
|
294
|
-
Step 1: Use gpt-4
|
|
294
|
+
Step 1: Use gpt-5.4 (larger context length) to process all context and generate
|
|
295
295
|
concise instructions for message generation.
|
|
296
296
|
|
|
297
|
-
Step 2: Use gpt-5.
|
|
297
|
+
Step 2: Use gpt-5.4 (better content generation) to generate the actual
|
|
298
298
|
LinkedIn message from the condensed instructions.
|
|
299
299
|
"""
|
|
300
300
|
cleaned_context = cleanup_linkedin_context(linkedin_context)
|
|
301
301
|
lead_data = cleaned_context.lead_info or Lead()
|
|
302
302
|
sender_data = cleaned_context.sender_info or SenderInfo()
|
|
303
303
|
|
|
304
|
-
# Step 1: Generate instructions using gpt-4
|
|
304
|
+
# Step 1: Generate instructions using gpt-5.4
|
|
305
305
|
instructions = await generate_linkedin_instructions(
|
|
306
306
|
linkedin_context=linkedin_context,
|
|
307
307
|
variation_text=variation_text,
|
|
308
308
|
tool_config=tool_config,
|
|
309
309
|
)
|
|
310
310
|
|
|
311
|
-
# Step 2: Generate message using gpt-5.
|
|
311
|
+
# Step 2: Generate message using gpt-5.4
|
|
312
312
|
use_cache = linkedin_context.message_instructions.use_cache if linkedin_context.message_instructions else True
|
|
313
313
|
campaign_data = cleaned_context.campaign_context or CampaignContext()
|
|
314
314
|
message_response = await generate_linkedin_from_instructions(
|
|
@@ -227,7 +227,7 @@ async def generate_linkedin_response_message_copy(
|
|
|
227
227
|
initial_response, status = await get_structured_output_with_assistant_and_vector_store(
|
|
228
228
|
prompt=prompt,
|
|
229
229
|
response_format=LinkedInTriageResponse,
|
|
230
|
-
model="gpt-5.
|
|
230
|
+
model="gpt-5.4",
|
|
231
231
|
vector_store_id=cleaned_context.external_known_data.external_openai_vector_store_id,
|
|
232
232
|
tool_config=tool_config,
|
|
233
233
|
use_cache=linkedin_context.message_instructions.use_cache if linkedin_context.message_instructions else True
|
|
@@ -236,7 +236,7 @@ async def generate_linkedin_response_message_copy(
|
|
|
236
236
|
initial_response, status = await get_structured_output_internal(
|
|
237
237
|
prompt,
|
|
238
238
|
LinkedInTriageResponse,
|
|
239
|
-
model="gpt-5.
|
|
239
|
+
model="gpt-5.4",
|
|
240
240
|
tool_config=tool_config,
|
|
241
241
|
use_cache=linkedin_context.message_instructions.use_cache if linkedin_context.message_instructions else True
|
|
242
242
|
)
|
|
@@ -182,7 +182,7 @@ async def get_structured_output_internal(
|
|
|
182
182
|
response_format: BaseModel,
|
|
183
183
|
effort: str = "low",
|
|
184
184
|
use_web_search: bool = False,
|
|
185
|
-
model: str = "gpt-5.
|
|
185
|
+
model: str = "gpt-5.4",
|
|
186
186
|
tool_config: Optional[List[Dict]] = None,
|
|
187
187
|
use_cache: bool = True
|
|
188
188
|
):
|
|
@@ -504,7 +504,7 @@ async def get_structured_output_with_mcp(
|
|
|
504
504
|
response_format: BaseModel,
|
|
505
505
|
effort: str = "low",
|
|
506
506
|
use_web_search: bool = False,
|
|
507
|
-
model: str = "gpt-5.
|
|
507
|
+
model: str = "gpt-5.4",
|
|
508
508
|
tool_config: Optional[List[Dict[str, Any]]] = None,
|
|
509
509
|
) -> Tuple[Union[BaseModel, str], str]:
|
|
510
510
|
"""
|
|
@@ -670,7 +670,7 @@ async def get_structured_output_with_assistant_and_vector_store(
|
|
|
670
670
|
response_format: BaseModel,
|
|
671
671
|
vector_store_id: str,
|
|
672
672
|
effort: str = "low",
|
|
673
|
-
model="gpt-5.
|
|
673
|
+
model="gpt-5.4",
|
|
674
674
|
tool_config: Optional[List[Dict]] = None,
|
|
675
675
|
use_cache: bool = True
|
|
676
676
|
):
|
{dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/openai_assistant_and_file_utils.py
RENAMED
|
@@ -179,7 +179,7 @@ async def delete_files(
|
|
|
179
179
|
async def run_file_search(
|
|
180
180
|
query: str,
|
|
181
181
|
vector_store_id: str,
|
|
182
|
-
model: str = "gpt-5.
|
|
182
|
+
model: str = "gpt-5.4",
|
|
183
183
|
max_num_results: int = 5,
|
|
184
184
|
store: bool = True,
|
|
185
185
|
tool_config: Optional[List[Dict]] = None,
|
|
@@ -223,7 +223,7 @@ async def run_file_search(
|
|
|
223
223
|
|
|
224
224
|
async def run_response_text(
|
|
225
225
|
prompt: str,
|
|
226
|
-
model: str = "gpt-5.
|
|
226
|
+
model: str = "gpt-5.4",
|
|
227
227
|
max_tokens: int = 2048,
|
|
228
228
|
store: bool = True,
|
|
229
229
|
tool_config: Optional[List[Dict]] = None,
|
|
@@ -247,7 +247,7 @@ async def run_response_text(
|
|
|
247
247
|
async def run_response_structured(
|
|
248
248
|
prompt: str,
|
|
249
249
|
response_format: dict,
|
|
250
|
-
model: str = "gpt-5.
|
|
250
|
+
model: str = "gpt-5.4",
|
|
251
251
|
max_tokens: int = 1024,
|
|
252
252
|
store: bool = True,
|
|
253
253
|
tool_config: Optional[List[Dict]] = None,
|
|
@@ -330,7 +330,7 @@ async def process_agent_request(row_batch: List[Dict], workflow: Dict, custom_in
|
|
|
330
330
|
name="AI Assistant",
|
|
331
331
|
instructions=instructions,
|
|
332
332
|
tools=[],
|
|
333
|
-
model="gpt-5.
|
|
333
|
+
model="gpt-5.4"
|
|
334
334
|
)
|
|
335
335
|
thread = await client.beta.threads.create()
|
|
336
336
|
parsed_outputs = []
|
|
@@ -955,7 +955,7 @@ async def get_function_call_arguments(input_text: str, function_name: str) -> Tu
|
|
|
955
955
|
|
|
956
956
|
# Make the API call
|
|
957
957
|
response = await client.beta.chat.completions.parse(
|
|
958
|
-
model="gpt-5.
|
|
958
|
+
model="gpt-5.4",
|
|
959
959
|
messages=[
|
|
960
960
|
{"role": "system", "content": "Extract function arguments in JSON format."},
|
|
961
961
|
{"role": "user", "content": prompt},
|
|
@@ -51,7 +51,7 @@ async def get_structured_output(text: str, tool_config: Optional[List[Dict]] = N
|
|
|
51
51
|
f"Text:\n{text}"
|
|
52
52
|
)
|
|
53
53
|
result, status = await get_structured_output_internal(
|
|
54
|
-
prompt, LeadSearchResult, model = "gpt-5.
|
|
54
|
+
prompt, LeadSearchResult, model = "gpt-5.4", tool_config=tool_config
|
|
55
55
|
)
|
|
56
56
|
if status != "SUCCESS" or result is None:
|
|
57
57
|
return LeadSearchResult()
|
|
@@ -137,7 +137,7 @@ async def pick_best_linkedin_candidate_with_llm(
|
|
|
137
137
|
result, status = await get_structured_output_internal(
|
|
138
138
|
prompt,
|
|
139
139
|
LinkedinCandidateChoice,
|
|
140
|
-
model="gpt-5.
|
|
140
|
+
model="gpt-5.4",
|
|
141
141
|
tool_config=tool_config,
|
|
142
142
|
)
|
|
143
143
|
|
|
@@ -2460,7 +2460,7 @@ async def test_connectivity(tool_config: List[Dict[str, Any]]) -> Dict[str, Dict
|
|
|
2460
2460
|
|
|
2461
2461
|
# OpenAI needs extra args
|
|
2462
2462
|
if tool_name == "openai":
|
|
2463
|
-
model_name = next((c["value"] for c in config_entries if c["name"] == "modelName"), "gpt-5.
|
|
2463
|
+
model_name = next((c["value"] for c in config_entries if c["name"] == "modelName"), "gpt-5.4")
|
|
2464
2464
|
reasoning_effort = next((c["value"] for c in config_entries if c["name"] == "reasoningEffort"), "medium")
|
|
2465
2465
|
results[tool_name] = await test_openai(api_key, model_name, reasoning_effort)
|
|
2466
2466
|
|
|
@@ -159,7 +159,7 @@ async def create_property_mapping(
|
|
|
159
159
|
prompt=user_prompt,
|
|
160
160
|
response_format=PropertyMappingList,
|
|
161
161
|
effort="high",
|
|
162
|
-
model="gpt-5.
|
|
162
|
+
model="gpt-5.4",
|
|
163
163
|
tool_config=tool_config
|
|
164
164
|
)
|
|
165
165
|
if status == "SUCCESS" and response and response.properties:
|
|
@@ -21,7 +21,7 @@ async def call_openai_api(system_content: str, user_content: str, max_tokens: in
|
|
|
21
21
|
try:
|
|
22
22
|
# Call the OpenAI API using the new client method
|
|
23
23
|
response = client.chat.completions.create(
|
|
24
|
-
model="gpt-5.
|
|
24
|
+
model="gpt-5.4",
|
|
25
25
|
messages=[
|
|
26
26
|
{"role": "system", "content": system_content},
|
|
27
27
|
{"role": "user", "content": user_content}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/check_email_validity_tools.py
RENAMED
|
File without changes
|
|
File without changes
|
{dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/check_linkedin_url_validity.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/compose_three_step_workflow.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/extract_email_content_for_llm.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/openapi_tool/openapi_tool.py
RENAMED
|
File without changes
|
{dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/parse_linkedin_messages_txt.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/serarch_router_local_business.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dhisana-0.0.1.dev293 → dhisana-0.0.1.dev294}/src/dhisana/utils/serpapi_local_business_search.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|