dhisana 0.0.1.dev268__py3-none-any.whl → 0.0.1.dev269__py3-none-any.whl

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.
@@ -388,7 +388,12 @@ async def _get_structured_output_with_web_search(
388
388
  # No tool calls, we have the final response
389
389
  break
390
390
 
391
- # Execute tool calls and add to conversation history
391
+ # Add the model's complete output to conversation history (includes function_call items)
392
+ # Per OpenAI docs: "input_list += response.output"
393
+ for item in (completion.output or []):
394
+ conversation_history.append(item)
395
+
396
+ # Execute tool calls and add results to conversation history
392
397
  logging.info(f"Processing {len(tool_calls)} web search tool call(s) in iteration {tool_iteration}")
393
398
 
394
399
  for tc in tool_calls:
@@ -401,19 +406,10 @@ async def _get_structured_output_with_web_search(
401
406
  except json.JSONDecodeError:
402
407
  args = {}
403
408
 
404
- # Add the tool call to conversation history
405
- conversation_history.append({
406
- "type": "function_call",
407
- "id": call_id,
408
- "call_id": call_id,
409
- "name": func_name,
410
- "arguments": args_str,
411
- })
412
-
413
409
  # Execute the tool
414
410
  tool_result = await _execute_web_search_tool(func_name, args, tool_config)
415
411
 
416
- # Add tool result to conversation history
412
+ # Add tool result to conversation history (only function_call_output, not function_call)
417
413
  conversation_history.append({
418
414
  "type": "function_call_output",
419
415
  "call_id": call_id,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dhisana
3
- Version: 0.0.1.dev268
3
+ Version: 0.0.1.dev269
4
4
  Summary: A Python SDK for Dhisana AI Platform
5
5
  Home-page: https://github.com/dhisana-ai/dhisana-python-sdk
6
6
  Author: Admin
@@ -45,7 +45,7 @@ dhisana/utils/generate_flow.py,sha256=QMn6bWo0nH0fBvy2Ebub1XfH5udnVAqsPsbIqCtQPX
45
45
  dhisana/utils/generate_leads_salesnav.py,sha256=FG7q6GSm9IywZ9TgQnn5_N3QNfiI-Qk2gaO_3GS99nY,12236
46
46
  dhisana/utils/generate_linkedin_connect_message.py,sha256=QxsxDiT-3eQOqAAbW13d0HGJXV36WYPvC-7Zsw_2VTI,10208
47
47
  dhisana/utils/generate_linkedin_response_message.py,sha256=mWoSs5p2JSTIoFZFGm86x1kgs67J7dHPvGKZPzcdGdU,14569
48
- dhisana/utils/generate_structured_output_internal.py,sha256=g3g685JxOnxoObvY_ILSiJ38584QmZJ9WofDBGBcSJ8,31056
48
+ dhisana/utils/generate_structured_output_internal.py,sha256=G9eqgT5SYI60rlOi6qQTndtsUpaLDuNM509limO8Zfs,31061
49
49
  dhisana/utils/google_custom_search.py,sha256=5rQ4uAF-hjFpd9ooJkd6CjRvSmhZHhqM0jfHItsbpzk,10071
50
50
  dhisana/utils/google_oauth_tools.py,sha256=ReG5lCpXL3_e_s0yn6ai4U7B4-feOWHJVtbv_c0g0rE,28525
51
51
  dhisana/utils/google_workspace_tools.py,sha256=fuV0UcvAqF9drLzj7-p6D5zh7d5jMXl1jNJTICk4XOo,50224
@@ -95,8 +95,8 @@ dhisana/workflow/agent.py,sha256=esv7_i_XuMkV2j1nz_UlsHov_m6X5WZZiZm_tG4OBHU,565
95
95
  dhisana/workflow/flow.py,sha256=xWE3qQbM7j2B3FH8XnY3zOL_QXX4LbTW4ArndnEYJE0,1638
96
96
  dhisana/workflow/task.py,sha256=HlWz9mtrwLYByoSnePOemBUBrMEcj7KbgNjEE1oF5wo,1830
97
97
  dhisana/workflow/test.py,sha256=E7lRnXK0PguTNzyasHytLzTJdkqIPxG5_4qk4hMEeKc,3399
98
- dhisana-0.0.1.dev268.dist-info/METADATA,sha256=8qz6BDU9YaSqUcBCWrW30PB5Mc6io2BCalfA58uQA2s,1190
99
- dhisana-0.0.1.dev268.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
100
- dhisana-0.0.1.dev268.dist-info/entry_points.txt,sha256=jujxteZmNI9EkEaK-pOCoWuBujU8TCevdkfl9ZcKHek,49
101
- dhisana-0.0.1.dev268.dist-info/top_level.txt,sha256=NETTHt6YifG_P7XtRHbQiXZlgSFk9Qh9aR-ng1XTf4s,8
102
- dhisana-0.0.1.dev268.dist-info/RECORD,,
98
+ dhisana-0.0.1.dev269.dist-info/METADATA,sha256=i3l5OJUWJmr3y9sB2pfoTA2w9jTPSFgVCHqTIu8SiLA,1190
99
+ dhisana-0.0.1.dev269.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
100
+ dhisana-0.0.1.dev269.dist-info/entry_points.txt,sha256=jujxteZmNI9EkEaK-pOCoWuBujU8TCevdkfl9ZcKHek,49
101
+ dhisana-0.0.1.dev269.dist-info/top_level.txt,sha256=NETTHt6YifG_P7XtRHbQiXZlgSFk9Qh9aR-ng1XTf4s,8
102
+ dhisana-0.0.1.dev269.dist-info/RECORD,,