Skip to content

Commit b0788e2

Browse files
badri-singhalpriyanshi-2003
authored andcommitted
adding the direct proxy for the daily client
1 parent ec31b27 commit b0788e2

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

app/agents/voice/automatic/__init__.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,18 @@ async def run_normal_mode(args):
343343
if proxy_url:
344344
logger.info(f"Configuring Daily WebRTC proxy: {proxy_url}")
345345
try:
346-
# Set proxy URL on the Daily CallClient
347-
transport._client._client.set_proxy_url(proxy_url)
348-
logger.info("Daily WebRTC proxy configured successfully")
346+
# Set proxy environment variables - most reliable method
347+
os.environ.update(
348+
{
349+
"HTTP_PROXY": proxy_url,
350+
"HTTPS_PROXY": proxy_url,
351+
"http_proxy": proxy_url,
352+
"https_proxy": proxy_url,
353+
}
354+
)
355+
logger.info(
356+
"Daily WebRTC proxy configured successfully via environment variables"
357+
)
349358
except Exception as e:
350359
logger.error(f"Failed to configure Daily WebRTC proxy: {e}")
351360
# Don't fail initialization - continue without proxy

app/agents/voice/automatic/prompts/system/performance_directives.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def get_performance_directives() -> str:
88
Trigger: User asks about performance (today/this week/etc.)
99
1010
Steps:
11-
1. Call payment_analytics_by_dimension_function
11+
1. Call payment_analytics_by_dimension_function to find the total Cash on Delivery and total prepaid amounts for the specified timeframe
1212
2. Sum ALL prepaid methods into one number (never show breakdown)
1313
3. Calculate: ((Cash on Delivery - Prepaid) / Prepaid) × 100
1414
@@ -40,7 +40,7 @@ def offer_creation_directives() -> str:
4040
4141
Steps:
4242
1. Get AOV from analytics
43-
2. Calculate discount: (AOV × Gap%) ÷ 100, capped at 10% of AOV, minimum ₹5
43+
2. Calculate discount: (AOV × Gap%) ÷ 100, capped at 5% of AOV, minimum ₹5
4444
3. Round to nearest ₹5 or ₹10
4545
4. Present COMPLETE offer with ALL details at once
4646

app/agents/voice/automatic/tools/breeze/configuration.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,7 @@ async def _handle_create_surcharge_rule(params: FunctionCallParams):
113113
f"Received paymentMethodType: '{payment_method_type}' (type: {type(payment_method_type)})"
114114
)
115115

116-
if payment_method_type in ["CREDIT", "DEBIT"]:
117-
payment_method = "CREDIT/DEBIT"
118-
elif payment_method_type == "UPI":
119-
payment_method = "UPI"
120-
elif payment_method_type == "NB":
121-
payment_method = "NB"
122-
elif payment_method_type == "*":
123-
payment_method = "*"
124-
elif payment_method_type == "WALLET":
125-
payment_method = "WALLET"
126-
else:
127-
payment_method = "CASH"
116+
payment_method = "*"
128117

129118
logger.info(
130119
f"Derived paymentMethod: '{payment_method}' from paymentMethodType: '{payment_method_type}'"

0 commit comments

Comments
 (0)