Commit graph

1986 commits

Author SHA1 Message Date
Vitali sharp8n 71d97a5d8e bot update 11 2026-09-09 11:06:12 +03:00
Vitali sharp8n 1c2c7b7de0 botsharp enchance 2026-09-09 11:06:12 +03:00
Vitali sharp8n 9d4d824c1a add reasoning to stream 2026-09-09 11:06:12 +03:00
Vitali sharp8n aa132b1419 fix(DeepSeekAI): keep nameless arg fragments when grouping tool calls
The previous grouping pre-filtered tool-call updates on FunctionName
before grouping by index. In DeepSeek streaming only the FIRST fragment
of a call carries the name/id; the argument text arrives in later
fragments with FunctionName == null. The filter dropped them, so every
tool call got empty FunctionArgs (get_editor_state(), get_node() ->
'node_id is required').

Group ALL updates by Index first, then pick the first group that
contains a named fragment and concatenate every argument fragment in
that group. Verified via OpenPencil integration test: get_node now
carries {"node_id": "10"} intact instead of being empty or joined
across parallel calls.
2026-09-09 11:06:12 +03:00
Vitali sharp8n 9fe969a47c fix(DeepSeekAI): accumulate streaming tool-call args per call index
When the model emits several parallel tool calls in one streaming response,
the OpenAI SDK interleaves argument fragments by call index. The old code
joined ALL fragments of ALL calls into a single FunctionArgs string, which
produced corrupted arguments like get_node({"node_id": "10"}{"maxDepth": 2})
and made every tool call fail (e.g. 'node_id is required').

Group tool-call updates by Index and concatenate fragments only within the
first call that has a function name; other parallel calls are ignored (same
as before), but the selected call now gets clean, valid JSON arguments.

Also fix DecodePatchString: DeepSeek sends "reasoning_content": null in the
final delta; the decoder returned the literal string 'null' which was
appended to the accumulated reasoning text. Return null for the JSON null
literal instead.
2026-09-09 11:06:12 +03:00
Vitali sharp8n ce08fc132b fix(DeepSeekAI): capture and echo reasoning_content for thinking mode tool calls
DeepSeek thinking mode (deepseek-v4-flash/pro with reasoning enabled) returns
reasoning_content in every delta. For requests carrying tools, the reasoning_content
of previous assistant messages MUST be passed back in all subsequent requests,
otherwise DeepSeek answers 400 'The reasoning_content ... must be passed back'.

Changes:
- Bump OpenAI SDK 2.5.0 -> 2.12.0 (JsonPatch public API required to read/write
  the unknown reasoning_content property; 2.5.0 only stores it internally).
- Fix BotSharp.Plugin.OpenAI image quality enum names for SDK 2.12
  (GeneratedImageQuality.Low -> LowQuality, Medium -> MediumQuality).
- Add RoleDialogModel.ReasoningContent (serialized as reasoning_content) and
  persist it through DialogElement/DialogMetaData/ConversationStorage.
- DeepSeekAI ChatCompletionProvider:
  * capture reasoning_content from non-streaming responses (ExtractReasoningContent)
  * capture per-delta reasoning_content in the streaming loop and accumulate it
  * set ReasoningContent on assistant/function response messages
  * echo reasoning_content back via AssistantChatMessage JsonPatch in PrepareOptions
- RoutingService.InvokeAgent: copy response.ReasoningContent onto the stored
  Function/Assistant dialog so the echo survives the tool-call round trip.
2026-09-09 11:06:12 +03:00
Haiping Chen 099187fd5e Add image to Claude 2025-10-17 13:59:21 -05:00
Haiping Chen afeaa16738 Remove legacy Google PaLM 2025-10-17 13:58:38 -05:00
Nick Yi cf22033e30
Merge pull request #1191 from yileicn/master
instruct log optimize
2025-10-16 11:03:43 +08:00
nick.yi 2d387b6d31 add UpdateInstructionLogStates 2025-10-16 10:20:47 +08:00
Jicheng Lu a1a2a6f0d3 rename namespace 2025-10-15 19:33:15 -05:00
Jicheng Lu 8fa683af8b refine 2025-10-15 14:22:18 -05:00
Jicheng Lu 74b2773223 fix namespace 2025-10-15 13:24:27 -05:00
nick.yi 5783d28100 instruct/agentId interface add logId response 2025-10-15 17:10:06 +08:00
Jicheng Lu 6fcd3602a8 fix typo 2025-10-14 20:59:54 -05:00
Jicheng Lu b8ecef3687 rename image handler utilities 2025-10-14 20:53:20 -05:00
Haiping Chen e1dc28beef Image Composition 2025-10-14 20:28:09 -05:00
Haiping e99cfac819
Merge pull request #1181 from iceljc/features/add-image-llm-config
Features/add image llm config
2025-10-14 14:23:34 -05:00
nick.yi bce3e1cf11 optimze mongodb query default limit=10 2025-10-14 16:30:16 +08:00
nick.yi f6e9f4689b sql select support mongodb 2025-10-14 15:55:12 +08:00
Jicheng Lu 96262c35d2 add CodeScript in ProgramCodeTemplateMessage 2025-10-13 11:53:36 -05:00
Jicheng Lu e92d97f8b4 minor change 2025-10-12 22:50:12 -05:00
Jicheng Lu 3e71f24d1a refine update agent code scripts 2025-10-10 15:19:30 -05:00
Jicheng Lu 835a3c71ef sync mongo 2025-10-10 14:16:35 -05:00
Jicheng Lu 28e3518e41 apply agent realtime config 2025-10-10 12:16:28 -05:00
Jicheng Lu dc2e3028ec refine llm config 2025-10-10 11:39:45 -05:00
Jicheng Lu 042516b17d Merge branch 'master' of https://github.com/SciSharp/BotSharp into features/add-image-llm-config 2025-10-10 09:54:42 -05:00
Jicheng Lu c1a9de4a04 revert 2025-10-09 17:43:29 -05:00
Jicheng Lu 282773ba5c fix typo 2025-10-09 17:32:06 -05:00
Haiping Chen ff2b1da2d9 skip file selection if there is only 1 image. 2025-10-09 17:23:51 -05:00
Jicheng Lu 8c0be61094 migrate image handle settings 2025-10-09 16:54:14 -05:00
Jicheng Lu 53d85ec54c init 2025-10-09 16:25:26 -05:00
Jicheng Lu 7a156b3c03 Merge branch 'master' of https://github.com/SciSharp/BotSharp into features/refine-py-interpreter 2025-10-08 16:02:37 -05:00
Jicheng Lu b34c989c44 revert 2025-10-08 16:02:23 -05:00
iceljc 88b18c04c2
Merge pull request #1177 from iceljc/features/refine-py-interpreter
refine running py code script
2025-10-08 15:29:39 -05:00
Jicheng Lu c20ab2e2e7 minor change 2025-10-08 15:28:54 -05:00
Jicheng Lu 333807ceb7 revert 2025-10-08 15:25:53 -05:00
Jicheng Lu 2079ba3760 remove allow thread 2025-10-08 15:12:00 -05:00
Jicheng Lu c30787a8ea change text 2025-10-07 22:42:53 -05:00
Jicheng Lu 605109bcca add ai programmer and file assistant 2025-10-07 22:38:09 -05:00
Jicheng Lu 4e0801780b clean code 2025-10-07 21:58:54 -05:00
Jicheng Lu edd2ad6002 refine running py code script 2025-10-07 21:57:08 -05:00
iceljc 4404e21a44
Merge pull request #1176 from iceljc/features/refine-py-interpreter
Features/refine py interpreter
2025-10-07 14:11:34 -05:00
Jicheng Lu babb8795b3 add demo script 2025-10-06 10:50:20 -05:00
Jicheng Lu 5be85d3f4b refine repository for agent code script 2025-10-06 01:27:18 -05:00
Jicheng Lu 74d0c96e2f refine 2025-10-01 19:58:28 -05:00
Jicheng Lu 56a8e046f1 reset argv 2025-10-01 10:21:58 -05:00
Haiping 479087cf82
Merge pull request #1175 from hchen2020/master
Add IWebElementLocator
2025-09-30 23:46:54 -05:00
Jicheng Lu 24295bfe42 minor change 2025-09-30 21:12:34 -05:00
Jicheng Lu 0a7dbfe44f refine 2025-09-30 20:45:32 -05:00