Usability pass: tool registry, TUI polish, saved keys and settings
Tools - Table-driven tool registry with permission classes and default/minimal profiles; new tools: edit_file, list_dir, glob, grep, delete_file, move_file, todo_write, web_fetch, ask_user (plus read_file paging). - Built-in Myers diff; write tools return unified diffs. - Persistent permission rules (.agent/permissions.json), per-turn undo snapshots (.agent/undo), AGENTS.md project notes, auto-compact at 80% of the model context, cancellable run_shell with process-group kill. TUI - Table-driven slash commands: /provider /key /effort /status /tools /permissions /yolo /undo /retry /diff /export /copy /rename /delete /init /max-steps /todo, with / and @ completion. - Permission modal with diff and prefix rules, ask_user modal, todo panel, header with model/effort/context, bracketed paste, line editing, wide-char cursor, NO_COLOR and ASCII fallback; Esc never quits. Startup and configuration - API keys are entered in the TUI (hidden) and saved per provider in <config>/credentials (0600); env variables are only a fallback. - Last provider, per-provider model and reasoning effort are remembered in <config>/settings.json; --effort/-e and /effort send reasoning_effort (low|medium|high|max) to models that accept it. - DeepSeek preset uses deepseek-flash / deepseek-v4-pro. - Session flags --new/--continue/--resume/--list-sessions, --yolo, --confirm. Compatibility and tests - ncurses detection, macOS/Homebrew support, make install, XDG config dir, POSIX cleanups; Gitea CI (gcc/clang/asan/musl/macOS). - Unit tests for diff, fs tools, registry, undo/perms and config; e2e fixtures multi_file_refactor and ask_or_todo; vendored cJSON.
This commit is contained in:
+136
@@ -0,0 +1,136 @@
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"I"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"'ll"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" read"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" file"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" first"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" then"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" fix"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" verify"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".\n\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" read"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_file"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" path"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"2"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" run"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_s"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"hell"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" cmd"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" ls"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"3"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" run"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_s"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"hell"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" cmd"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" cat"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" Make"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"file"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"2"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":">/"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"dev"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"/null"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" ||"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" echo"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" NO"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"MA"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"K"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"EF"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"ILE"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"67ff4cc0-8a08-4234-8329-bee4060c7a4b","object":"chat.completion.chunk","created":1791129423,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":513,"completion_tokens":65,"total_tokens":578,"prompt_tokens_details":{"cached_tokens":0},"prompt_cache_hit_tokens":0,"prompt_cache_miss_tokens":513}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"F"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"ixing"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" subtraction"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" addition"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".\n\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"4"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" apply"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_p"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"atch"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" patch"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" <<"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"EOF"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_P"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"---"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"++"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"@@"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" -"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" +"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" @@"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" add"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"(int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":",int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"){"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"return"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":";}\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" add"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"(int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":",int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"){"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"return"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":";}\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"EOF"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_P"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"5"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" run"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_s"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"hell"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" cmd"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" make"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ed4aba25-8ee5-4dc0-9b7d-9b2dcc423e00","object":"chat.completion.chunk","created":1791129424,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":648,"completion_tokens":76,"total_tokens":724,"prompt_tokens_details":{"cached_tokens":512},"prompt_cache_hit_tokens":512,"prompt_cache_miss_tokens":136}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"已"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"修复"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"并"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"验证"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"通过"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"。\n\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" `"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"中"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" `"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"add"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"由"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" `"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"改为"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" `"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"。\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" `"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"make"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"成功"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"执行"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"("},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"g"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"cc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" -"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" -"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"o"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".o"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"退出"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"码"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"0"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"),"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"编译"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"无"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"错误"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"/"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"警告"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"。"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"640f22a2-d6d3-4733-bc37-ce82a3f92a3d","object":"chat.completion.chunk","created":1791129425,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":815,"completion_tokens":61,"total_tokens":876,"prompt_tokens_details":{"cached_tokens":640},"prompt_cache_hit_tokens":640,"prompt_cache_miss_tokens":175}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" read"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_file"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" path"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"2"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" run"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_s"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"hell"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" cmd"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" ls"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" -"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"la"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"fd345b5a-6dca-48ea-89cc-a1b46aba4b4c","object":"chat.completion.chunk","created":1791129419,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":533,"completion_tokens":28,"total_tokens":561,"prompt_tokens_details":{"cached_tokens":0},"prompt_cache_hit_tokens":0,"prompt_cache_miss_tokens":533}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"3"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" apply"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_p"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"atch"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" patch"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"168"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"---"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"++"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"@@"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" -"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" +"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" @@"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" add"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"(int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":",int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"){"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"return"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":";}\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" add"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"(int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":",int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"){"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"return"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":";}\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"4"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" run"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_s"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"hell"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" cmd"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" make"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"18bbad75-0a93-488f-a620-68ff5855d5f1","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":758,"completion_tokens":65,"total_tokens":823,"prompt_tokens_details":{"cached_tokens":512},"prompt_cache_hit_tokens":512,"prompt_cache_miss_tokens":246}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"3"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" apply"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_p"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"atch"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" patch"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"167"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"---"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"++"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"@@"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" -"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" +"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" @@"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" add"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"(int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":",int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"){"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"return"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":";}\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" add"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"(int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":",int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"){"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"return"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":";}\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"4"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" run"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_s"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"hell"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" cmd"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" make"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"32be4327-270c-404a-bb3b-e4fb0cf13a9b","object":"chat.completion.chunk","created":1791129420,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":875,"completion_tokens":66,"total_tokens":941,"prompt_tokens_details":{"cached_tokens":640},"prompt_cache_hit_tokens":640,"prompt_cache_miss_tokens":235}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"3"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" apply"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_p"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"atch"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" patch"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"166"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"---"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"++"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"@@"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" -"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" +"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" @@"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" add"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"(int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":",int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"){"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"return"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":";}\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" add"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"(int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":",int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"){"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"return"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":";}\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"4"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" run"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_s"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"hell"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" cmd"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" make"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"0ded657e-8f2f-4d4e-9c13-d5fb666a86a1","object":"chat.completion.chunk","created":1791129421,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":992,"completion_tokens":65,"total_tokens":1057,"prompt_tokens_details":{"cached_tokens":768},"prompt_cache_hit_tokens":768,"prompt_cache_miss_tokens":224}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"3"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" write"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_file"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" path"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" content"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"30"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" add"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"(int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":",int"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"){"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"return"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":";}\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"call"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"4"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" run"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"_s"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"hell"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"arg"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" cmd"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" make"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"end"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"ffc819f8-00d7-4384-98ca-d5c42890dd92","object":"chat.completion.chunk","created":1791129422,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":1109,"completion_tokens":42,"total_tokens":1151,"prompt_tokens_details":{"cached_tokens":896},"prompt_cache_hit_tokens":896,"prompt_cache_miss_tokens":213}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"I"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"'ll"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" start"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" by"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" reading"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" file"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_00_cQI4DUJGUuIKLJCl2r8X7824","type":"function","function":{"name":"read_file","arguments":""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"path"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":": "}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"calc"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":".c"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"}"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_01_AqMzb2tRQvknY0l4tEjo6908","type":"function","function":{"name":"run_shell","arguments":""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"cmd"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":": "}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ls"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"}"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b0c53f2a-4b70-42c6-821c-64cc4b932bb7","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":726,"completion_tokens":74,"total_tokens":800,"prompt_tokens_details":{"cached_tokens":512},"prompt_cache_hit_tokens":512,"prompt_cache_miss_tokens":214}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"I"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" see"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" bug"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":":"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" `"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"add"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" subtract"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"s"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" Let"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" me"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" check"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" Make"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"file"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" too"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" then"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" fix"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" it"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_00_0EjqefEETmqoUPI8qzLI2461","type":"function","function":{"name":"read_file","arguments":""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"path"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":": "}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Make"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"file"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"}"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_01_sBsSZn4J0GLps2eUCaYr7475","type":"function","function":{"name":"read_file","arguments":""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"path"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":": "}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"out"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":".txt"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"}"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"db73c1db-5194-4de4-8801-841ca742367a","object":"chat.completion.chunk","created":1791129415,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":900,"completion_tokens":89,"total_tokens":989,"prompt_tokens_details":{"cached_tokens":640},"prompt_cache_hit_tokens":640,"prompt_cache_miss_tokens":260}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"Now"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" fix"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":":"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_00_TffhUFBFFmXLxjfgOFaM0933","type":"function","function":{"name":"apply_patch","arguments":""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"patch"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":": "}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"---"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" a"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"calc"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":".c"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\\n"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"++"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"+"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" b"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"calc"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":".c"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\\n"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"@@"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" -"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"1"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" +"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"1"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" @@"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\\n"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-int"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" add"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"(int"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" a"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":",int"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" b"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"){"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"return"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" a"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-b"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":";}\\n"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"+"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"int"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" add"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"(int"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" a"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":",int"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" b"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"){"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"return"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" a"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"+b"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":";}\\n"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"}"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"b660d9cb-535f-43ab-a0ad-2478603cd9e2","object":"chat.completion.chunk","created":1791129417,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":1117,"completion_tokens":83,"total_tokens":1200,"prompt_tokens_details":{"cached_tokens":896},"prompt_cache_hit_tokens":896,"prompt_cache_miss_tokens":221}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"Now"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" verify"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" make"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":":"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_00_Zy4eH1WRLL3mNeWbEf6f4361","type":"function","function":{"name":"run_shell","arguments":""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"cmd"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":": "}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"make"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" &&"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" cat"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" calc"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":".c"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" &&"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" ls"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\""}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"}"}}]},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"8d94d47c-9098-4983-bfad-f1c88be1bab2","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":1294,"completion_tokens":48,"total_tokens":1342,"prompt_tokens_details":{"cached_tokens":1152},"prompt_cache_hit_tokens":1152,"prompt_cache_miss_tokens":142}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"修复"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"完成"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"。\n\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"问题"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":":"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"中"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" `"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"add"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"返回"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" `"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"("},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"实现"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"成了"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"减法"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":")。\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"修改"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":":"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"改为"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" `"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"return"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"+b"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":";"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`\n"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"-"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"验证"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":":"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"make"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"成功"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"g"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"cc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" -"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".c"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" -"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"o"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".o"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"无"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"错误"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"/"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"警告"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"已"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"生成"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":" `"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"calc"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":".o"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"`"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":"。"},"logprobs":null,"finish_reason":null}],"usage":null}
|
||||
|
||||
data: {"id":"de00fc60-b7a9-416c-8a40-de4c9bd4bac6","object":"chat.completion.chunk","created":1791129418,"model":"deepseek-flash","system_fingerprint":"aeb56401ca74e127821c4f9126dcb669","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":1420,"completion_tokens":73,"total_tokens":1493,"prompt_tokens_details":{"cached_tokens":1280},"prompt_cache_hit_tokens":1280,"prompt_cache_miss_tokens":140}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include "cst_agent.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static int nfail;
|
||||
|
||||
#define EXPECT(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
fprintf(stderr, "FAIL %s:%d: %s\n", __FILE__, __LINE__, msg); \
|
||||
nfail++; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static char *apply(const char *orig, const char *hunks, int *rc, int *nh,
|
||||
char *err, size_t esz) {
|
||||
char *out = NULL;
|
||||
size_t out_len = 0;
|
||||
*rc = cst_patch_apply_buffer(orig, strlen(orig), hunks, strlen(hunks), &out,
|
||||
&out_len, nh, err, esz);
|
||||
return out;
|
||||
}
|
||||
|
||||
static void test_buffer_basic(void) {
|
||||
char err[256];
|
||||
int rc, nh;
|
||||
const char *orig = "a\nb\nc\nd\ne\n";
|
||||
char *out = apply(orig, "@@ -2,3 +2,3 @@\n b\n-c\n+C\n d\n", &rc, &nh, err,
|
||||
sizeof(err));
|
||||
EXPECT(rc == 0 && nh == 1, "single hunk applies");
|
||||
EXPECT(out && strcmp(out, "a\nb\nC\nd\ne\n") == 0, "single hunk result");
|
||||
free(out);
|
||||
|
||||
/* two hunks, the second located relative to the shift of the first */
|
||||
out = apply(orig, "@@ -1,2 +1,3 @@\n a\n+a2\n b\n@@ -4,2 +5,2 @@\n d\n-e\n+E\n",
|
||||
&rc, &nh, err, sizeof(err));
|
||||
EXPECT(rc == 0 && nh == 2, "two hunks apply");
|
||||
EXPECT(out && strcmp(out, "a\na2\nb\nc\nd\nE\n") == 0, "two hunk result");
|
||||
free(out);
|
||||
|
||||
/* wrong line numbers: found by searching near the hint */
|
||||
out = apply(orig, "@@ -40,1 +40,1 @@\n-d\n+D\n", &rc, &nh, err, sizeof(err));
|
||||
EXPECT(rc == 0, "hint off: searched");
|
||||
EXPECT(out && strcmp(out, "a\nb\nc\nD\ne\n") == 0, "search result");
|
||||
free(out);
|
||||
|
||||
/* bare @@ without numbers, unique context */
|
||||
out = apply(orig, "@@\n c\n-d\n+dd\n", &rc, &nh, err, sizeof(err));
|
||||
EXPECT(rc == 0 && out && strcmp(out, "a\nb\nc\ndd\ne\n") == 0, "bare @@");
|
||||
free(out);
|
||||
}
|
||||
|
||||
static void test_buffer_edge(void) {
|
||||
char err[256];
|
||||
int rc, nh;
|
||||
/* ambiguous context without a line hint is refused */
|
||||
char *out = apply("x\ny\nx\ny\n", "@@\n-x\n+z\n", &rc, &nh, err, sizeof(err));
|
||||
EXPECT(rc != 0, "ambiguous refused");
|
||||
EXPECT(strstr(err, "ambiguous") != NULL, "ambiguous error text");
|
||||
free(out);
|
||||
|
||||
/* the same hunk with a hint picks the hinted occurrence */
|
||||
out = apply("x\ny\nx\ny\n", "@@ -3,1 +3,1 @@\n-x\n+z\n", &rc, &nh, err,
|
||||
sizeof(err));
|
||||
EXPECT(rc == 0 && out && strcmp(out, "x\ny\nz\ny\n") == 0, "hinted occurrence");
|
||||
free(out);
|
||||
|
||||
/* missing context fails and changes nothing (all-or-nothing) */
|
||||
out = apply("a\nb\n", "@@ -1,1 +1,1 @@\n-a\n+A\n@@ -9,1 +9,1 @@\n-zzz\n+q\n",
|
||||
&rc, &nh, err, sizeof(err));
|
||||
EXPECT(rc != 0 && out == NULL, "second hunk fails -> nothing");
|
||||
free(out);
|
||||
|
||||
/* trailing whitespace drift is tolerated by the loose pass */
|
||||
out = apply("int x; \nint y;\n", "@@ -1,2 +1,2 @@\n int x;\n-int y;\n+int z;\n",
|
||||
&rc, &nh, err, sizeof(err));
|
||||
EXPECT(rc == 0 && out && strstr(out, "int z;"), "rtrim-loose match");
|
||||
free(out);
|
||||
|
||||
/* no final newline preserved / added */
|
||||
out = apply("a\nb", "@@ -2 +2 @@\n-b\n\\ No newline at end of file\n+B\n"
|
||||
"\\ No newline at end of file\n",
|
||||
&rc, &nh, err, sizeof(err));
|
||||
EXPECT(rc == 0 && out && strcmp(out, "a\nB") == 0, "no final newline kept");
|
||||
free(out);
|
||||
|
||||
/* a blank line inside a hunk is empty context (models drop the space) */
|
||||
out = apply("a\n\nb\n", "@@ -1,3 +1,3 @@\n a\n\n-b\n+B\n", &rc, &nh, err,
|
||||
sizeof(err));
|
||||
EXPECT(rc == 0 && out && strcmp(out, "a\n\nB\n") == 0, "blank context line");
|
||||
free(out);
|
||||
|
||||
/* tabs survive */
|
||||
out = apply("all:\n\tgcc a.c\n", "@@ -2 +2 @@\n-\tgcc a.c\n+\tgcc -O2 a.c\n",
|
||||
&rc, &nh, err, sizeof(err));
|
||||
EXPECT(rc == 0 && out && strcmp(out, "all:\n\tgcc -O2 a.c\n") == 0, "tabs");
|
||||
free(out);
|
||||
}
|
||||
|
||||
static char g_ws[256];
|
||||
|
||||
static void put(const char *rel, const char *content) {
|
||||
char p[512];
|
||||
snprintf(p, sizeof(p), "%s/%s", g_ws, rel);
|
||||
FILE *fp = fopen(p, "wb");
|
||||
fputs(content, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
static char *get(const char *rel) {
|
||||
char p[512];
|
||||
snprintf(p, sizeof(p), "%s/%s", g_ws, rel);
|
||||
FILE *fp = fopen(p, "rb");
|
||||
if (!fp)
|
||||
return NULL;
|
||||
static char buf[8192];
|
||||
size_t n = fread(buf, 1, sizeof(buf) - 1, fp);
|
||||
buf[n] = 0;
|
||||
fclose(fp);
|
||||
return buf;
|
||||
}
|
||||
|
||||
static int run_patch(const char *patch, cst_tool_result_t *r) {
|
||||
ctl_tool_call_t c;
|
||||
memset(&c, 0, sizeof(c));
|
||||
snprintf(c.id, sizeof(c.id), "t");
|
||||
snprintf(c.name, sizeof(c.name), "apply_patch");
|
||||
snprintf(c.args[0].key, sizeof(c.args[0].key), "patch");
|
||||
c.args[0].value = (char *)patch;
|
||||
c.args[0].value_len = strlen(patch);
|
||||
c.nargs = 1;
|
||||
memset(r, 0, sizeof(*r));
|
||||
cst_tool_dispatch(g_ws, &c, r);
|
||||
return r->exit_code;
|
||||
}
|
||||
|
||||
static void test_tool_multi_file(void) {
|
||||
put("a.c", "int a = 1;\n");
|
||||
put("b.c", "int b = 2;\n");
|
||||
put("gone.c", "x\n");
|
||||
cst_tool_result_t r;
|
||||
int ec = run_patch("--- a/a.c\n+++ b/a.c\n@@ -1 +1 @@\n-int a = 1;\n+int a = 10;\n"
|
||||
"--- a/b.c\n+++ b/b.c\n@@ -1 +1 @@\n-int b = 2;\n+int b = 20;\n"
|
||||
"--- /dev/null\n+++ b/sub/dir/new.c\n@@ -0,0 +1,2 @@\n+one\n+two\n"
|
||||
"--- a/gone.c\n+++ /dev/null\n@@ -1 +0,0 @@\n-x\n",
|
||||
&r);
|
||||
EXPECT(ec == 0, "multi-file patch ok");
|
||||
if (ec != 0)
|
||||
fprintf(stderr, "%.*s\n", (int)r.out_len, r.out ? r.out : "");
|
||||
cst_tool_result_free(&r);
|
||||
char *s = get("a.c");
|
||||
EXPECT(s && strcmp(s, "int a = 10;\n") == 0, "a.c updated");
|
||||
s = get("b.c");
|
||||
EXPECT(s && strcmp(s, "int b = 20;\n") == 0, "b.c updated");
|
||||
s = get("sub/dir/new.c");
|
||||
EXPECT(s && strcmp(s, "one\ntwo\n") == 0, "new file with parent dirs");
|
||||
EXPECT(get("gone.c") == NULL, "deleted file");
|
||||
|
||||
/* second file fails -> first file untouched */
|
||||
ec = run_patch("--- a/a.c\n+++ b/a.c\n@@ -1 +1 @@\n-int a = 10;\n+int a = 99;\n"
|
||||
"--- a/b.c\n+++ b/b.c\n@@ -1 +1 @@\n-no such line\n+q\n",
|
||||
&r);
|
||||
EXPECT(ec != 0, "failing multi-file patch reports error");
|
||||
cst_tool_result_free(&r);
|
||||
s = get("a.c");
|
||||
EXPECT(s && strcmp(s, "int a = 10;\n") == 0, "all-or-nothing across files");
|
||||
|
||||
/* escaping the workspace is refused */
|
||||
ec = run_patch("--- /dev/null\n+++ b/../escape.c\n@@ -0,0 +1 @@\n+x\n", &r);
|
||||
EXPECT(ec != 0, "path escape refused");
|
||||
cst_tool_result_free(&r);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
test_buffer_basic();
|
||||
test_buffer_edge();
|
||||
snprintf(g_ws, sizeof(g_ws), "/tmp/cst-patch-test-%d", (int)getpid());
|
||||
mkdir(g_ws, 0755);
|
||||
test_tool_multi_file();
|
||||
char cmd[300];
|
||||
snprintf(cmd, sizeof(cmd), "rm -rf %s /tmp/escape.c", g_ws);
|
||||
if (system(cmd) != 0)
|
||||
fprintf(stderr, "warning: cleanup failed\n");
|
||||
if (nfail) {
|
||||
fprintf(stderr, "test_apply_patch: %d failed\n", nfail);
|
||||
return 1;
|
||||
}
|
||||
printf("test_apply_patch: OK\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
#ifndef _DEFAULT_SOURCE
|
||||
#define _DEFAULT_SOURCE
|
||||
#endif
|
||||
|
||||
#include "cst_agent.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define CHECK(c) \
|
||||
do { \
|
||||
if (!(c)) { \
|
||||
fprintf(stderr, "%s:%d: CHECK(%s) failed\n", __FILE__, __LINE__, #c); \
|
||||
exit(1); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static char g_dir[256];
|
||||
|
||||
static void write_file(const char *name, const char *text) {
|
||||
char path[512];
|
||||
snprintf(path, sizeof(path), "%s/cst-agent/%s", g_dir, name);
|
||||
FILE *fp = fopen(path, "w");
|
||||
CHECK(fp);
|
||||
fputs(text, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
static void test_creds(void) {
|
||||
char key[512];
|
||||
const char *from = NULL;
|
||||
CHECK(cst_creds_resolve("deepseek", key, sizeof(key), &from) != 0);
|
||||
|
||||
/* legacy single-key file follows its api_base */
|
||||
write_file("credentials", "api_key=sk-legacy\n"
|
||||
"api_base=https://api.minimax.cn/v1/\n");
|
||||
CHECK(cst_creds_load("minimax", key, sizeof(key)) == 0);
|
||||
CHECK(strcmp(key, "sk-legacy") == 0);
|
||||
CHECK(cst_creds_load("deepseek", key, sizeof(key)) != 0);
|
||||
write_file("credentials", "api_key=sk-old\n");
|
||||
CHECK(cst_creds_load("minimax", key, sizeof(key)) == 0);
|
||||
CHECK(cst_creds_load("openai", key, sizeof(key)) != 0);
|
||||
|
||||
CHECK(cst_creds_save("deepseek", "sk-ds-1") == 0);
|
||||
CHECK(cst_creds_save("openai", "sk-oa") == 0);
|
||||
CHECK(cst_creds_save("deepseek", "sk-ds-2") == 0);
|
||||
CHECK(cst_creds_load("deepseek", key, sizeof(key)) == 0);
|
||||
CHECK(strcmp(key, "sk-ds-2") == 0);
|
||||
CHECK(cst_creds_load("openai", key, sizeof(key)) == 0);
|
||||
CHECK(strcmp(key, "sk-oa") == 0);
|
||||
CHECK(cst_creds_load("minimax", key, sizeof(key)) == 0); /* legacy kept */
|
||||
CHECK(strcmp(key, "sk-old") == 0);
|
||||
CHECK(cst_creds_save("deepseek", "bad\nkey") != 0);
|
||||
|
||||
char path[512];
|
||||
snprintf(path, sizeof(path), "%s/cst-agent/credentials", g_dir);
|
||||
struct stat st;
|
||||
CHECK(stat(path, &st) == 0);
|
||||
CHECK((st.st_mode & 0077) == 0);
|
||||
|
||||
CHECK(cst_creds_resolve("deepseek", key, sizeof(key), &from) == 0);
|
||||
CHECK(strcmp(from, "saved") == 0);
|
||||
setenv("MINIMAX_API_KEY", "sk-env", 1);
|
||||
unlink(path);
|
||||
CHECK(cst_creds_resolve("minimax", key, sizeof(key), &from) == 0);
|
||||
CHECK(strcmp(key, "sk-env") == 0 && strcmp(from, "MINIMAX_API_KEY") == 0);
|
||||
unsetenv("MINIMAX_API_KEY");
|
||||
}
|
||||
|
||||
static void test_settings(void) {
|
||||
cst_settings_t s;
|
||||
CHECK(cst_settings_load(&s) != 0);
|
||||
CHECK(cst_settings_model(&s, "deepseek") == NULL);
|
||||
|
||||
cst_agent_config_t cfg;
|
||||
memset(&cfg, 0, sizeof(cfg));
|
||||
snprintf(cfg.provider, sizeof(cfg.provider), "deepseek");
|
||||
snprintf(cfg.model, sizeof(cfg.model), "deepseek-v4-pro");
|
||||
snprintf(cfg.effort, sizeof(cfg.effort), "high");
|
||||
CHECK(cst_settings_remember(&cfg) == 0);
|
||||
snprintf(cfg.provider, sizeof(cfg.provider), "openai");
|
||||
snprintf(cfg.model, sizeof(cfg.model), "gpt-5");
|
||||
snprintf(cfg.effort, sizeof(cfg.effort), "max");
|
||||
CHECK(cst_settings_remember(&cfg) == 0);
|
||||
|
||||
CHECK(cst_settings_load(&s) == 0);
|
||||
CHECK(strcmp(s.provider, "openai") == 0);
|
||||
CHECK(strcmp(s.effort, "max") == 0);
|
||||
CHECK(strcmp(cst_settings_model(&s, "deepseek"), "deepseek-v4-pro") == 0);
|
||||
CHECK(strcmp(cst_settings_model(&s, "openai"), "gpt-5") == 0);
|
||||
CHECK(s.nmodels == 2);
|
||||
|
||||
write_file("settings.json", "{not json");
|
||||
CHECK(cst_settings_load(&s) != 0);
|
||||
CHECK(s.provider[0] == 0);
|
||||
}
|
||||
|
||||
static void test_effort(void) {
|
||||
CHECK(cst_effort_valid("low") && cst_effort_valid("max"));
|
||||
CHECK(!cst_effort_valid("ultra") && !cst_effort_valid(NULL));
|
||||
CHECK(strcmp(cst_effort_wire("deepseek", "deepseek-flash", "max"), "max") ==
|
||||
0);
|
||||
CHECK(strcmp(cst_effort_wire("openai", "o3-mini", "max"), "high") == 0);
|
||||
CHECK(cst_effort_wire("openai", "gpt-4.1-mini", "high") == NULL);
|
||||
CHECK(cst_effort_wire("minimax", "MiniMax-M2.7", "high") == NULL);
|
||||
|
||||
cst_message_t m = {0};
|
||||
m.role = CST_ROLE_USER;
|
||||
m.content = "hi";
|
||||
cst_llm_request_t req = {0};
|
||||
req.model = "deepseek-flash";
|
||||
req.msgs = &m;
|
||||
req.nmsgs = 1;
|
||||
char *body = cst_llm_build_body(&req);
|
||||
CHECK(body && !strstr(body, "reasoning_effort"));
|
||||
free(body);
|
||||
req.reasoning_effort = "high";
|
||||
body = cst_llm_build_body(&req);
|
||||
CHECK(body && strstr(body, "\"reasoning_effort\":\"high\""));
|
||||
free(body);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
snprintf(g_dir, sizeof(g_dir), "/tmp/cst-config-XXXXXX");
|
||||
CHECK(mkdtemp(g_dir));
|
||||
setenv("XDG_CONFIG_HOME", g_dir, 1);
|
||||
unsetenv("DEEPSEEK_API_KEY");
|
||||
unsetenv("MINIMAX_API_KEY");
|
||||
unsetenv("OPENAI_API_KEY");
|
||||
char sub[300];
|
||||
snprintf(sub, sizeof(sub), "%s/cst-agent", g_dir);
|
||||
CHECK(mkdir(sub, 0700) == 0);
|
||||
|
||||
test_creds();
|
||||
test_settings();
|
||||
test_effort();
|
||||
|
||||
char cmd[400];
|
||||
snprintf(cmd, sizeof(cmd), "rm -rf '%s'", g_dir);
|
||||
CHECK(system(cmd) == 0);
|
||||
printf("test_config: OK\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
#include "ctl.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Heredoc args: `arg <key> <<TAG` ... a line equal to TAG.
|
||||
* The body is confirmed only by the terminator line, so no prefix of the
|
||||
* stream may ever produce CALL_READY. */
|
||||
|
||||
static int nfail;
|
||||
|
||||
#define EXPECT(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
fprintf(stderr, "FAIL %s:%d: %s\n", __FILE__, __LINE__, msg); \
|
||||
nfail++; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
typedef struct {
|
||||
int ready;
|
||||
int nargs;
|
||||
char keys[CTL_MAX_ARGS][CTL_MAX_KEY];
|
||||
char *vals[CTL_MAX_ARGS];
|
||||
size_t lens[CTL_MAX_ARGS];
|
||||
char text[4096];
|
||||
size_t text_len;
|
||||
} cap_t;
|
||||
|
||||
static void on_ev(const ctl_event_t *ev, void *ud) {
|
||||
cap_t *c = ud;
|
||||
if (ev->type == CTL_EV_TEXT && c->text_len + ev->text_len < sizeof(c->text)) {
|
||||
memcpy(c->text + c->text_len, ev->text, ev->text_len);
|
||||
c->text_len += ev->text_len;
|
||||
}
|
||||
if (ev->type != CTL_EV_CALL_READY)
|
||||
return;
|
||||
c->ready++;
|
||||
c->nargs = ev->call->nargs;
|
||||
for (int i = 0; i < ev->call->nargs; i++) {
|
||||
snprintf(c->keys[i], sizeof(c->keys[i]), "%s", ev->call->args[i].key);
|
||||
free(c->vals[i]);
|
||||
c->vals[i] = malloc(ev->call->args[i].value_len + 1);
|
||||
memcpy(c->vals[i], ev->call->args[i].value, ev->call->args[i].value_len);
|
||||
c->vals[i][ev->call->args[i].value_len] = 0;
|
||||
c->lens[i] = ev->call->args[i].value_len;
|
||||
}
|
||||
}
|
||||
|
||||
static void cap_free(cap_t *c) {
|
||||
for (int i = 0; i < CTL_MAX_ARGS; i++)
|
||||
free(c->vals[i]);
|
||||
memset(c, 0, sizeof(*c));
|
||||
}
|
||||
|
||||
/* feed in `chunk`-byte pieces; finish if asked */
|
||||
static ctl_status_t run(const char *s, size_t n, size_t chunk, int finish,
|
||||
cap_t *c, ctl_parser_stats_t *st) {
|
||||
memset(c, 0, sizeof(*c));
|
||||
ctl_parser_t *p = ctl_parser_create(on_ev, c);
|
||||
ctl_status_t rc = CTL_OK;
|
||||
for (size_t i = 0; i < n && rc == CTL_OK; i += chunk) {
|
||||
size_t k = n - i < chunk ? n - i : chunk;
|
||||
rc = ctl_parser_feed(p, s + i, k);
|
||||
}
|
||||
if (rc == CTL_OK && finish)
|
||||
rc = ctl_parser_finish(p);
|
||||
if (st)
|
||||
ctl_parser_stats(p, st);
|
||||
ctl_parser_destroy(p);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static const char *BODY = "all:\n"
|
||||
"\tgcc -o app main.c\n"
|
||||
"\n"
|
||||
"end\n"
|
||||
"call x y\n"
|
||||
"arg path 3\n"
|
||||
"```\n"
|
||||
" EOF\n"
|
||||
"last line\n";
|
||||
|
||||
static const char *STREAM = "Writing the Makefile.\n"
|
||||
"call w1 write_file\n"
|
||||
"arg path Makefile\n"
|
||||
"arg content <<EOF\n"
|
||||
"all:\n"
|
||||
"\tgcc -o app main.c\n"
|
||||
"\n"
|
||||
"end\n"
|
||||
"call x y\n"
|
||||
"arg path 3\n"
|
||||
"```\n"
|
||||
" EOF\n"
|
||||
"last line\n"
|
||||
"EOF\n"
|
||||
"end\n";
|
||||
|
||||
static void test_body_verbatim(void) {
|
||||
size_t chunks[] = {1, 2, 5, 64, 100000};
|
||||
for (size_t k = 0; k < sizeof(chunks) / sizeof(chunks[0]); k++) {
|
||||
cap_t c;
|
||||
ctl_parser_stats_t st;
|
||||
ctl_status_t rc = run(STREAM, strlen(STREAM), chunks[k], 1, &c, &st);
|
||||
EXPECT(rc == CTL_OK, "heredoc stream ok");
|
||||
EXPECT(c.ready == 1, "one call ready");
|
||||
EXPECT(c.nargs == 2, "two args");
|
||||
EXPECT(strcmp(c.keys[0], "path") == 0 && strcmp(c.vals[0], "Makefile") == 0,
|
||||
"inline path");
|
||||
EXPECT(strcmp(c.keys[1], "content") == 0, "content key");
|
||||
EXPECT(c.vals[1] && strcmp(c.vals[1], BODY) == 0,
|
||||
"body verbatim: tabs, blank lines, end/call/arg/fence lines, "
|
||||
"indented tag");
|
||||
EXPECT(st.args_heredoc == 1 && st.args_inline == 1, "stats per arg form");
|
||||
EXPECT(c.text_len == strlen("Writing the Makefile.\n"), "prose is text");
|
||||
cap_free(&c);
|
||||
}
|
||||
}
|
||||
|
||||
static void test_never_premature(void) {
|
||||
size_t n = strlen(STREAM);
|
||||
int premature = 0;
|
||||
for (size_t cut = 0; cut < n; cut++) {
|
||||
cap_t c;
|
||||
run(STREAM, cut, 7, 0, &c, NULL);
|
||||
if (c.ready)
|
||||
premature++;
|
||||
cap_free(&c);
|
||||
}
|
||||
EXPECT(premature == 0, "no prefix of a heredoc call is executable");
|
||||
|
||||
/* EOF inside the body: error, nothing executed */
|
||||
const char *mid = strstr(STREAM, "\tgcc");
|
||||
cap_t c;
|
||||
ctl_parser_stats_t st;
|
||||
ctl_status_t rc = run(STREAM, (size_t)(mid - STREAM), 3, 1, &c, &st);
|
||||
EXPECT(rc == CTL_ERR_CONTRACT && c.ready == 0, "EOF in heredoc rejected");
|
||||
EXPECT(st.error_kind == CTL_EK_HEREDOC_EOF, "error kind heredoc_eof");
|
||||
cap_free(&c);
|
||||
}
|
||||
|
||||
static void test_tag_forms(void) {
|
||||
const char *quoted = "call q1 write_file\narg path a.txt\n"
|
||||
"arg content <<'BODY_1'\nx\nBODY_1\nend\n";
|
||||
cap_t c;
|
||||
EXPECT(run(quoted, strlen(quoted), 1, 1, &c, NULL) == CTL_OK && c.ready == 1,
|
||||
"single-quoted tag");
|
||||
EXPECT(c.vals[1] && strcmp(c.vals[1], "x\n") == 0, "quoted tag body");
|
||||
cap_free(&c);
|
||||
|
||||
const char *dq = "call q2 write_file\narg path a.txt\n"
|
||||
"arg content << \"T\"\n\nT\nend\n";
|
||||
EXPECT(run(dq, strlen(dq), 4, 1, &c, NULL) == CTL_OK && c.ready == 1,
|
||||
"double-quoted tag with space");
|
||||
EXPECT(c.vals[1] && strcmp(c.vals[1], "\n") == 0, "single blank line body");
|
||||
cap_free(&c);
|
||||
|
||||
const char *empty = "call q3 write_file\narg path a.txt\n"
|
||||
"arg content <<E\nE\nend\n";
|
||||
EXPECT(run(empty, strlen(empty), 3, 1, &c, NULL) == CTL_OK && c.ready == 1 &&
|
||||
c.lens[1] == 0,
|
||||
"empty body");
|
||||
cap_free(&c);
|
||||
|
||||
const char *bad = "call q4 write_file\narg content <<a-b\nx\na-b\nend\n";
|
||||
ctl_parser_stats_t st;
|
||||
EXPECT(run(bad, strlen(bad), 1, 1, &c, &st) == CTL_ERR_CONTRACT &&
|
||||
st.error_kind == CTL_EK_BAD_ARG && c.ready == 0,
|
||||
"invalid tag rejected");
|
||||
cap_free(&c);
|
||||
|
||||
/* terminator on the last line without newline, implicit end at EOF */
|
||||
const char *eof = "call q5 write_file\narg path a.txt\narg content <<EOF\n"
|
||||
"body\nEOF";
|
||||
EXPECT(run(eof, strlen(eof), 2, 1, &c, NULL) == CTL_OK && c.ready == 1,
|
||||
"tag at EOF accepted");
|
||||
EXPECT(c.vals[1] && strcmp(c.vals[1], "body\n") == 0, "tag at EOF body");
|
||||
cap_free(&c);
|
||||
|
||||
/* mixing all three arg forms in one call */
|
||||
const char *mix = "call m1 apply_patch\narg note hello world\narg patch 4\n"
|
||||
"ab\ncarg extra <<X\nq\nX\nend\n";
|
||||
EXPECT(run(mix, strlen(mix), 1, 1, &c, &st) == CTL_OK && c.ready == 1 &&
|
||||
c.nargs == 3,
|
||||
"inline + nbytes + heredoc in one call");
|
||||
EXPECT(c.vals[1] && strcmp(c.vals[1], "ab\nc") == 0, "nbytes body exact");
|
||||
EXPECT(st.args_inline == 1 && st.args_nbytes == 1 && st.args_heredoc == 1,
|
||||
"stats count each form");
|
||||
cap_free(&c);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
test_body_verbatim();
|
||||
test_never_premature();
|
||||
test_tag_forms();
|
||||
if (nfail) {
|
||||
fprintf(stderr, "test_ctl_heredoc: %d failed\n", nfail);
|
||||
return 1;
|
||||
}
|
||||
printf("test_ctl_heredoc: OK\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
/* Built-in unified diff: GNU `diff -u` layout on unambiguous cases, and a
|
||||
* randomized round trip through our own patcher. */
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include "cst_agent.h"
|
||||
#include "cst_tools.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static int nfail;
|
||||
|
||||
#define EXPECT(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
fprintf(stderr, "FAIL %s:%d: %s\n", __FILE__, __LINE__, msg); \
|
||||
nfail++; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static void put(const char *p, const char *s) {
|
||||
FILE *fp = fopen(p, "wb");
|
||||
if (fp) {
|
||||
fputs(s, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
/* GNU diff output, or NULL when diff is not installed. */
|
||||
static char *gnu_diff(const char *a, const char *b) {
|
||||
char pa[] = "/tmp/cstdiffaXXXXXX", pb[] = "/tmp/cstdiffbXXXXXX";
|
||||
int fa = mkstemp(pa), fb = mkstemp(pb);
|
||||
if (fa < 0 || fb < 0)
|
||||
return NULL;
|
||||
close(fa);
|
||||
close(fb);
|
||||
put(pa, a);
|
||||
put(pb, b);
|
||||
char cmd[256];
|
||||
snprintf(cmd, sizeof(cmd),
|
||||
"LC_ALL=C diff -u --label a/f --label b/f %s %s 2>/dev/null", pa,
|
||||
pb);
|
||||
FILE *pp = popen(cmd, "r");
|
||||
char *out = NULL;
|
||||
if (pp) {
|
||||
size_t cap = 4096, n = 0;
|
||||
out = malloc(cap);
|
||||
int ch;
|
||||
while (out && (ch = fgetc(pp)) != EOF) {
|
||||
if (n + 1 >= cap) {
|
||||
cap *= 2;
|
||||
out = realloc(out, cap);
|
||||
}
|
||||
if (out)
|
||||
out[n++] = (char)ch;
|
||||
}
|
||||
int st = pclose(pp);
|
||||
if (out)
|
||||
out[n] = 0;
|
||||
if (st == -1 || (WEXITSTATUS(st) != 0 && WEXITSTATUS(st) != 1)) {
|
||||
free(out);
|
||||
out = NULL;
|
||||
}
|
||||
}
|
||||
unlink(pa);
|
||||
unlink(pb);
|
||||
return out;
|
||||
}
|
||||
|
||||
static int have_gnu_diff(void) {
|
||||
char *o = gnu_diff("x\n", "y\n");
|
||||
int ok = o && strstr(o, "@@ -1 +1 @@");
|
||||
free(o);
|
||||
return ok;
|
||||
}
|
||||
|
||||
static char *mine(const char *a, const char *b) {
|
||||
return cst_diff_unified("f", a, strlen(a), b, strlen(b));
|
||||
}
|
||||
|
||||
static void same_as_gnu(const char *name, const char *a, const char *b,
|
||||
int gnu) {
|
||||
char *m = mine(a, b);
|
||||
EXPECT(m != NULL, name);
|
||||
if (gnu && m) {
|
||||
char *g = gnu_diff(a, b);
|
||||
if (g && strcmp(g, m) != 0) {
|
||||
fprintf(stderr, "FAIL %s: differs from diff -u\n--- ours\n%s--- gnu\n%s",
|
||||
name, m, g);
|
||||
nfail++;
|
||||
}
|
||||
free(g);
|
||||
}
|
||||
free(m);
|
||||
}
|
||||
|
||||
/* Apply our diff with our patcher; must reproduce b. */
|
||||
static int round_trip(const char *a, const char *b) {
|
||||
char *d = mine(a, b);
|
||||
if (!d)
|
||||
return 0;
|
||||
int ok;
|
||||
if (!d[0]) {
|
||||
ok = strcmp(a, b) == 0;
|
||||
} else {
|
||||
const char *h = strstr(d, "\n+++ ");
|
||||
h = h ? strchr(h + 1, '\n') : NULL;
|
||||
char *out = NULL;
|
||||
size_t out_len = 0;
|
||||
int nh = 0;
|
||||
char err[256];
|
||||
int rc = h ? cst_patch_apply_buffer(a, strlen(a), h + 1, strlen(h + 1),
|
||||
&out, &out_len, &nh, err, sizeof(err))
|
||||
: -1;
|
||||
ok = rc == 0 && out && out_len == strlen(b) && memcmp(out, b, out_len) == 0;
|
||||
if (!ok)
|
||||
fprintf(stderr, "round trip failed (%s)\n--- a\n%s--- b\n%s--- diff\n%s",
|
||||
rc ? err : "content", a, b, d);
|
||||
free(out);
|
||||
}
|
||||
free(d);
|
||||
return ok;
|
||||
}
|
||||
|
||||
static char *random_text(unsigned *seed, int lines) {
|
||||
static const char *const words[] = {"alpha", "beta", "gamma", "delta",
|
||||
"{", "}", "", "return 0;"};
|
||||
size_t cap = (size_t)lines * 16 + 2, n = 0;
|
||||
char *s = malloc(cap);
|
||||
for (int i = 0; i < lines; i++) {
|
||||
const char *w = words[rand_r(seed) % 8];
|
||||
n += (size_t)snprintf(s + n, cap - n, "%s%d\n", w, rand_r(seed) % 3);
|
||||
}
|
||||
s[n] = 0;
|
||||
if (n && rand_r(seed) % 5 == 0)
|
||||
s[n - 1] = 0; /* no newline at end of file */
|
||||
return s;
|
||||
}
|
||||
|
||||
static char *mutate(unsigned *seed, const char *a) {
|
||||
size_t n = strlen(a), cap = n * 2 + 256, o = 0;
|
||||
char *b = malloc(cap);
|
||||
const char *p = a;
|
||||
while (*p) {
|
||||
const char *e = strchr(p, '\n');
|
||||
size_t len = e ? (size_t)(e - p) + 1 : strlen(p);
|
||||
int r = rand_r(seed) % 10;
|
||||
if (r == 0) {
|
||||
/* drop the line */
|
||||
} else if (r == 1) {
|
||||
o += (size_t)snprintf(b + o, cap - o, "inserted%d\n", rand_r(seed) % 9);
|
||||
memcpy(b + o, p, len);
|
||||
o += len;
|
||||
} else if (r == 2) {
|
||||
o += (size_t)snprintf(b + o, cap - o, "changed%d\n", rand_r(seed) % 9);
|
||||
} else {
|
||||
memcpy(b + o, p, len);
|
||||
o += len;
|
||||
}
|
||||
p += len;
|
||||
}
|
||||
b[o] = 0;
|
||||
return b;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
char *m = mine("same\n", "same\n");
|
||||
EXPECT(m && m[0] == 0, "identical -> empty");
|
||||
free(m);
|
||||
|
||||
int gnu = have_gnu_diff();
|
||||
if (!gnu)
|
||||
fprintf(stderr, "note: GNU diff not found; layout checks use round trip "
|
||||
"only\n");
|
||||
|
||||
same_as_gnu("modify", "a\nb\nc\nd\ne\n", "a\nb\nC\nd\ne\n", gnu);
|
||||
same_as_gnu("insert head", "a\nb\n", "z\na\nb\n", gnu);
|
||||
same_as_gnu("append", "a\nb\n", "a\nb\nc\n", gnu);
|
||||
same_as_gnu("delete", "a\nb\nc\n", "a\nc\n", gnu);
|
||||
same_as_gnu("new file", "", "x\ny\n", gnu);
|
||||
same_as_gnu("emptied", "x\ny\n", "", gnu);
|
||||
same_as_gnu("no eol added", "a\nb", "a\nb\n", gnu);
|
||||
same_as_gnu("no eol kept", "a\nb", "a\nB", gnu);
|
||||
same_as_gnu("two hunks",
|
||||
"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n",
|
||||
"1\nTWO\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\nFOURTEEN\n15\n",
|
||||
gnu);
|
||||
same_as_gnu("merged hunks", "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n",
|
||||
"1\nX\n3\n4\n5\n6\n7\nY\n9\n10\n", gnu);
|
||||
|
||||
m = mine("a\n", "b\n");
|
||||
EXPECT(m && strncmp(m, "--- a/f\n+++ b/f\n@@ -1 +1 @@\n-a\n+b\n", 34) == 0,
|
||||
"header layout");
|
||||
free(m);
|
||||
|
||||
unsigned seed = 12345;
|
||||
int ok = 0, total = 400;
|
||||
for (int i = 0; i < total; i++) {
|
||||
char *a = random_text(&seed, 1 + (int)(rand_r(&seed) % 60));
|
||||
char *b = mutate(&seed, a);
|
||||
ok += round_trip(a, b);
|
||||
free(a);
|
||||
free(b);
|
||||
}
|
||||
EXPECT(ok == total, "random round trips");
|
||||
|
||||
/* very different large inputs hit the fallback and still round trip */
|
||||
{
|
||||
size_t n = 6000;
|
||||
char *a = malloc(n * 8), *b = malloc(n * 8);
|
||||
size_t oa = 0, ob = 0;
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
oa += (size_t)sprintf(a + oa, "a%zu\n", i);
|
||||
ob += (size_t)sprintf(b + ob, "b%zu\n", i);
|
||||
}
|
||||
EXPECT(round_trip(a, b), "fallback round trip");
|
||||
free(a);
|
||||
free(b);
|
||||
}
|
||||
|
||||
if (nfail) {
|
||||
fprintf(stderr, "test_diff: %d failure(s)\n", nfail);
|
||||
return 1;
|
||||
}
|
||||
printf("test_diff: OK (%d random round trips)\n", total);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
#include "cJSON.h"
|
||||
#include "cst_agent.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static int nfail;
|
||||
|
||||
#define EXPECT(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
fprintf(stderr, "FAIL %s:%d: %s\n", __FILE__, __LINE__, msg); \
|
||||
nfail++; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static cst_message_t msg(cst_role_t role, const char *content) {
|
||||
cst_message_t m;
|
||||
memset(&m, 0, sizeof(m));
|
||||
m.role = role;
|
||||
m.content = (char *)content;
|
||||
return m;
|
||||
}
|
||||
|
||||
static cJSON *build(const cst_message_t *msgs, int n, int tools,
|
||||
size_t tool_cap) {
|
||||
cst_llm_request_t r;
|
||||
memset(&r, 0, sizeof(r));
|
||||
r.model = "test-model";
|
||||
r.msgs = msgs;
|
||||
r.nmsgs = n;
|
||||
r.enable_tools = tools;
|
||||
r.tool_out_cap = tool_cap;
|
||||
char *body = cst_llm_build_body(&r);
|
||||
EXPECT(body != NULL, "body built");
|
||||
cJSON *j = body ? cJSON_Parse(body) : NULL;
|
||||
EXPECT(j != NULL, "body is valid JSON");
|
||||
free(body);
|
||||
return j;
|
||||
}
|
||||
|
||||
static const char *content_at(const cJSON *root, int i) {
|
||||
const cJSON *msgs = cJSON_GetObjectItemCaseSensitive(root, "messages");
|
||||
const cJSON *m = cJSON_GetArrayItem(msgs, i);
|
||||
const cJSON *c = cJSON_GetObjectItemCaseSensitive(m, "content");
|
||||
return cJSON_IsString(c) ? c->valuestring : NULL;
|
||||
}
|
||||
|
||||
static const char *role_at(const cJSON *root, int i) {
|
||||
const cJSON *msgs = cJSON_GetObjectItemCaseSensitive(root, "messages");
|
||||
const cJSON *m = cJSON_GetArrayItem(msgs, i);
|
||||
const cJSON *r = cJSON_GetObjectItemCaseSensitive(m, "role");
|
||||
return cJSON_IsString(r) ? r->valuestring : "";
|
||||
}
|
||||
|
||||
static int nmsgs(const cJSON *root) {
|
||||
return cJSON_GetArraySize(cJSON_GetObjectItemCaseSensitive(root, "messages"));
|
||||
}
|
||||
|
||||
/* TAB / quotes / backslash / control bytes / CJK must survive verbatim
|
||||
* (the old hand-rolled escaper turned a Makefile TAB into HTTP 400). */
|
||||
static void test_escaping(void) {
|
||||
const char *text = "all:\n\tgcc -o \"a b\" x.c \\\n\x01\x1f end 中文";
|
||||
cst_message_t m[2] = {msg(CST_ROLE_SYSTEM, "sys"), msg(CST_ROLE_USER, text)};
|
||||
cJSON *j = build(m, 2, 0, 0);
|
||||
const char *c = content_at(j, 1);
|
||||
EXPECT(c && strcmp(c, text) == 0, "user content roundtrips exactly");
|
||||
EXPECT(!cJSON_GetObjectItemCaseSensitive(j, "tools"), "no tools when off");
|
||||
const cJSON *so = cJSON_GetObjectItemCaseSensitive(j, "stream_options");
|
||||
EXPECT(cJSON_IsTrue(cJSON_GetObjectItemCaseSensitive(so, "include_usage")),
|
||||
"stream_options.include_usage");
|
||||
cJSON_Delete(j);
|
||||
}
|
||||
|
||||
static void test_invalid_utf8(void) {
|
||||
const char text[] = "ok \xff\xfe bad \xe4\xb8 trunc";
|
||||
cst_message_t m[1] = {msg(CST_ROLE_USER, text)};
|
||||
cJSON *j = build(m, 1, 0, 0);
|
||||
const char *c = content_at(j, 0);
|
||||
EXPECT(c != NULL, "content present");
|
||||
EXPECT(c && strlen(c) == strlen(text), "sanitize keeps byte length");
|
||||
EXPECT(c && strstr(c, "ok ") == c, "valid prefix kept");
|
||||
cJSON_Delete(j);
|
||||
}
|
||||
|
||||
static void test_tool_calls_and_null_content(void) {
|
||||
cst_message_t m[3];
|
||||
m[0] = msg(CST_ROLE_USER, "go");
|
||||
m[1] = msg(CST_ROLE_ASSISTANT, "");
|
||||
m[1].tool_calls_json =
|
||||
"[{\"id\":\"c1\",\"type\":\"function\",\"function\":{\"name\":"
|
||||
"\"read_file\",\"arguments\":\"{\\\"path\\\":\\\"a\\tb.c\\\"}\"}}]";
|
||||
m[2] = msg(CST_ROLE_TOOL, "[tool read_file id=c1 exit=0]\nhello");
|
||||
snprintf(m[2].tool_call_id, sizeof(m[2].tool_call_id), "c1");
|
||||
cJSON *j = build(m, 3, 1, 0);
|
||||
const cJSON *msgs = cJSON_GetObjectItemCaseSensitive(j, "messages");
|
||||
const cJSON *a = cJSON_GetArrayItem(msgs, 1);
|
||||
EXPECT(cJSON_IsNull(cJSON_GetObjectItemCaseSensitive(a, "content")),
|
||||
"assistant content null with tool_calls");
|
||||
const cJSON *tc = cJSON_GetObjectItemCaseSensitive(a, "tool_calls");
|
||||
EXPECT(cJSON_IsArray(tc) && cJSON_GetArraySize(tc) == 1, "tool_calls kept");
|
||||
const cJSON *t = cJSON_GetArrayItem(msgs, 2);
|
||||
EXPECT(strcmp(role_at(j, 2), "tool") == 0, "tool role");
|
||||
const cJSON *tid = cJSON_GetObjectItemCaseSensitive(t, "tool_call_id");
|
||||
EXPECT(cJSON_IsString(tid) && strcmp(tid->valuestring, "c1") == 0,
|
||||
"tool_call_id");
|
||||
const cJSON *tools = cJSON_GetObjectItemCaseSensitive(j, "tools");
|
||||
EXPECT(cJSON_IsArray(tools) && cJSON_GetArraySize(tools) >= 4,
|
||||
"tools[] schema present");
|
||||
const cJSON *choice = cJSON_GetObjectItemCaseSensitive(j, "tool_choice");
|
||||
EXPECT(cJSON_IsString(choice) && strcmp(choice->valuestring, "auto") == 0,
|
||||
"tool_choice auto");
|
||||
cJSON_Delete(j);
|
||||
}
|
||||
|
||||
static void test_merge_and_orphan_tool(void) {
|
||||
cst_message_t m[3];
|
||||
m[0] = msg(CST_ROLE_USER, "first");
|
||||
m[1] = msg(CST_ROLE_TOOL, "orphan output"); /* no id -> user text */
|
||||
m[2] = msg(CST_ROLE_USER, "third");
|
||||
cJSON *j = build(m, 3, 0, 0);
|
||||
EXPECT(nmsgs(j) == 1, "consecutive user messages merged");
|
||||
const char *c = content_at(j, 0);
|
||||
EXPECT(c && strstr(c, "first") && strstr(c, "orphan output") &&
|
||||
strstr(c, "third"),
|
||||
"merged content keeps all parts in order");
|
||||
cJSON_Delete(j);
|
||||
}
|
||||
|
||||
static void test_tool_cap_head_tail(void) {
|
||||
size_t n = 100000;
|
||||
char *big = malloc(n + 1);
|
||||
memset(big, 'x', n);
|
||||
memcpy(big, "HEAD", 4);
|
||||
memcpy(big + n - 4, "TAIL", 4);
|
||||
big[n] = 0;
|
||||
cst_message_t m[3];
|
||||
m[0] = msg(CST_ROLE_USER, "go");
|
||||
m[1] = msg(CST_ROLE_ASSISTANT, "");
|
||||
m[1].tool_calls_json = "[{\"id\":\"c1\",\"type\":\"function\",\"function\":"
|
||||
"{\"name\":\"run_shell\",\"arguments\":\"{}\"}}]";
|
||||
m[2] = msg(CST_ROLE_TOOL, big);
|
||||
snprintf(m[2].tool_call_id, sizeof(m[2].tool_call_id), "c1");
|
||||
cJSON *j = build(m, 3, 1, 1000);
|
||||
const char *c = content_at(j, 2);
|
||||
EXPECT(c && strlen(c) < 1200, "tool output capped");
|
||||
EXPECT(c && strncmp(c, "HEAD", 4) == 0, "head kept");
|
||||
EXPECT(c && strcmp(c + strlen(c) - 4, "TAIL") == 0, "tail kept");
|
||||
EXPECT(c && strstr(c, "omitted"), "omission note");
|
||||
cJSON_Delete(j);
|
||||
|
||||
/* user text (e.g. text-protocol result frames) is never capped */
|
||||
cst_message_t u[1] = {msg(CST_ROLE_USER, big)};
|
||||
j = build(u, 1, 0, 1000);
|
||||
c = content_at(j, 0);
|
||||
EXPECT(c && strlen(c) == n, "user text not capped");
|
||||
cJSON_Delete(j);
|
||||
free(big);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
test_escaping();
|
||||
test_invalid_utf8();
|
||||
test_tool_calls_and_null_content();
|
||||
test_merge_and_orphan_tool();
|
||||
test_tool_cap_head_tail();
|
||||
if (nfail) {
|
||||
fprintf(stderr, "test_llm_body: %d failed\n", nfail);
|
||||
return 1;
|
||||
}
|
||||
printf("test_llm_body: OK\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
/* Tool registry: schema / prompt generation, profiles and /tools switches. */
|
||||
#include "cJSON.h"
|
||||
#include "cst_agent.h"
|
||||
#include "cst_tools.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static int nfail;
|
||||
|
||||
#define EXPECT(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
fprintf(stderr, "FAIL %s:%d: %s\n", __FILE__, __LINE__, msg); \
|
||||
nfail++; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static int schema_has(cJSON *arr, const char *name) {
|
||||
const cJSON *t = NULL;
|
||||
cJSON_ArrayForEach(t, arr) {
|
||||
const cJSON *fn = cJSON_GetObjectItemCaseSensitive(t, "function");
|
||||
const cJSON *nm = cJSON_GetObjectItemCaseSensitive(fn, "name");
|
||||
if (cJSON_IsString(nm) && strcmp(nm->valuestring, name) == 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
cst_agent_config_t cfg;
|
||||
memset(&cfg, 0, sizeof(cfg));
|
||||
|
||||
/* every tool has a runner and a well-formed parameter list */
|
||||
EXPECT(cst_tool_count() >= 13, "registry size");
|
||||
for (int i = 0; i < cst_tool_count(); i++) {
|
||||
const cst_tool_def_t *t = cst_tool_at(i);
|
||||
EXPECT(t->run != NULL, t->name);
|
||||
EXPECT((t->perm == CST_TP_WRITE) == (t->preview != NULL),
|
||||
"write tools (and only those) have previews");
|
||||
EXPECT(cst_tool_find(t->name) == t, "find by name");
|
||||
}
|
||||
|
||||
cJSON *all = cst_tools_schema_cfg(&cfg);
|
||||
EXPECT(cJSON_GetArraySize(all) == cst_tool_count(), "default: every tool");
|
||||
EXPECT(schema_has(all, "edit_file") && schema_has(all, "grep") &&
|
||||
schema_has(all, "web_fetch"),
|
||||
"default schema has new tools");
|
||||
cJSON_Delete(all);
|
||||
|
||||
cfg.tool_profile = CST_TOOLS_MINIMAL;
|
||||
cJSON *min = cst_tools_schema_cfg(&cfg);
|
||||
EXPECT(cJSON_GetArraySize(min) == 4, "minimal: four tools");
|
||||
EXPECT(schema_has(min, "read_file") && schema_has(min, "run_shell") &&
|
||||
schema_has(min, "write_file") && schema_has(min, "apply_patch"),
|
||||
"minimal: the original four");
|
||||
char *ms = cJSON_PrintUnformatted(min);
|
||||
EXPECT(ms && strstr(ms, "\"description\":\"Read a UTF-8 text file under the "
|
||||
"workspace.\""),
|
||||
"minimal keeps the original wording");
|
||||
EXPECT(ms && !strstr(ms, "offset"), "minimal hides optional params");
|
||||
free(ms);
|
||||
cJSON_Delete(min);
|
||||
|
||||
char *pmin = cst_agent_build_prompt(&cfg, CST_PROTO_NATIVE_EOS, NULL);
|
||||
EXPECT(pmin && strcmp(pmin, cst_agent_system_prompt_for(
|
||||
CST_PROTO_NATIVE_EOS)) == 0,
|
||||
"minimal prompt == legacy prompt");
|
||||
EXPECT(pmin && strstr(pmin, "ls/grep via run_shell"), "legacy workflow");
|
||||
free(pmin);
|
||||
char *pctl = cst_agent_build_prompt(&cfg, CST_PROTO_CTL, NULL);
|
||||
EXPECT(pctl && !strstr(pctl, "must be quoted"), "minimal ctl: no new rule");
|
||||
free(pctl);
|
||||
|
||||
cfg.tool_profile = CST_TOOLS_DEFAULT;
|
||||
char *pdef = cst_agent_build_prompt(&cfg, CST_PROTO_CTL_HEREDOC,
|
||||
"Always run `make test`.");
|
||||
EXPECT(pdef && strstr(pdef, "- edit_file(path, old_string, new_string, "
|
||||
"replace_all?):"),
|
||||
"default prompt lists edit_file with optional marker");
|
||||
EXPECT(pdef && strstr(pdef, "list_dir, glob, grep"), "default workflow");
|
||||
EXPECT(pdef && strstr(pdef, "must be quoted"), "ctl numeric rule");
|
||||
EXPECT(pdef && strstr(pdef, "Always run `make test`."), "project notes");
|
||||
free(pdef);
|
||||
|
||||
/* /tools off: grep disappears everywhere */
|
||||
cfg.tools_off = 1ULL << cst_tool_index("grep");
|
||||
EXPECT(!cst_tool_active(&cfg, cst_tool_find("grep")), "grep off");
|
||||
cJSON *off = cst_tools_schema_cfg(&cfg);
|
||||
EXPECT(!schema_has(off, "grep") && schema_has(off, "glob"), "schema off");
|
||||
cJSON_Delete(off);
|
||||
char *names = cst_tools_names(&cfg);
|
||||
EXPECT(names && !strstr(names, "grep") && strstr(names, "glob"),
|
||||
"names off");
|
||||
free(names);
|
||||
char *poff = cst_agent_build_prompt(&cfg, CST_PROTO_NATIVE_EOS, NULL);
|
||||
EXPECT(poff && !strstr(poff, "- grep(") && strstr(poff, "list_dir, glob)"),
|
||||
"prompt off");
|
||||
free(poff);
|
||||
|
||||
int prof = -1;
|
||||
EXPECT(cst_tool_profile_parse("minimal", &prof) == 0 &&
|
||||
prof == CST_TOOLS_MINIMAL,
|
||||
"parse minimal");
|
||||
EXPECT(cst_tool_profile_parse("bogus", &prof) != 0, "parse bogus");
|
||||
|
||||
if (nfail) {
|
||||
fprintf(stderr, "test_registry: %d failure(s)\n", nfail);
|
||||
return 1;
|
||||
}
|
||||
printf("test_registry: OK\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,295 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include "cJSON.h"
|
||||
#include "ctl.h"
|
||||
#include "cst_agent.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/*
|
||||
* Truncation experiment on recorded model streams (tests/fixtures/sse).
|
||||
*
|
||||
* For every recorded assistant message we rebuild the logical stream the
|
||||
* runtime sees and cut it at every byte:
|
||||
* - CTL traces: the content text; executable calls = CALL_READY events.
|
||||
* - native traces: tool calls as a JSON array of {"name","arguments"};
|
||||
* json-whole : execute only when the whole array parses (EOS baseline)
|
||||
* json-object: execute each object once it parses (incremental JSON)
|
||||
*
|
||||
* Checked properties (the CST soundness claims):
|
||||
* S1 no call is executable on a prefix unless its bytes are complete;
|
||||
* S2 every call executed on a prefix is identical to the same call in the
|
||||
* full stream (prefix consistency, i.e. execution is never revoked);
|
||||
* S3 the number of executable calls is monotone in the prefix length.
|
||||
* The printed table reports how early calls become executable (experiment C).
|
||||
*/
|
||||
|
||||
static int nfail;
|
||||
|
||||
#define EXPECT(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
fprintf(stderr, "FAIL %s:%d: %s\n", __FILE__, __LINE__, msg); \
|
||||
nfail++; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
typedef struct {
|
||||
char *buf;
|
||||
size_t len, cap;
|
||||
} sbuf_t;
|
||||
|
||||
static void sb_add(sbuf_t *b, const char *s, size_t n) {
|
||||
if (b->len + n + 1 > b->cap) {
|
||||
size_t nc = b->cap ? b->cap * 2 : 1024;
|
||||
while (nc < b->len + n + 1)
|
||||
nc *= 2;
|
||||
b->buf = realloc(b->buf, nc);
|
||||
b->cap = nc;
|
||||
}
|
||||
memcpy(b->buf + b->len, s, n);
|
||||
b->len += n;
|
||||
b->buf[b->len] = 0;
|
||||
}
|
||||
|
||||
#define MAXC 32
|
||||
|
||||
typedef struct {
|
||||
sbuf_t content;
|
||||
int ncalls;
|
||||
char names[MAXC][64];
|
||||
sbuf_t args[MAXC];
|
||||
} trace_t;
|
||||
|
||||
static void trace_free(trace_t *t) {
|
||||
free(t->content.buf);
|
||||
for (int i = 0; i < MAXC; i++)
|
||||
free(t->args[i].buf);
|
||||
memset(t, 0, sizeof(*t));
|
||||
}
|
||||
|
||||
static int load_trace(const char *path, trace_t *t) {
|
||||
memset(t, 0, sizeof(*t));
|
||||
FILE *fp = fopen(path, "rb");
|
||||
if (!fp)
|
||||
return -1;
|
||||
char *line = NULL;
|
||||
size_t cap = 0;
|
||||
ssize_t n;
|
||||
while ((n = getline(&line, &cap, fp)) > 0) {
|
||||
if (strncmp(line, "data:", 5) != 0)
|
||||
continue;
|
||||
cJSON *j = cJSON_Parse(line + 5);
|
||||
if (!j)
|
||||
continue;
|
||||
const cJSON *ch = cJSON_GetArrayItem(cJSON_GetObjectItem(j, "choices"), 0);
|
||||
const cJSON *d = cJSON_GetObjectItem(ch, "delta");
|
||||
const cJSON *c = cJSON_GetObjectItem(d, "content");
|
||||
if (cJSON_IsString(c))
|
||||
sb_add(&t->content, c->valuestring, strlen(c->valuestring));
|
||||
const cJSON *tc = NULL;
|
||||
cJSON_ArrayForEach(tc, cJSON_GetObjectItem(d, "tool_calls")) {
|
||||
const cJSON *ji = cJSON_GetObjectItem(tc, "index");
|
||||
int idx = cJSON_IsNumber(ji) ? ji->valueint : 0;
|
||||
if (idx < 0 || idx >= MAXC)
|
||||
continue;
|
||||
if (idx >= t->ncalls)
|
||||
t->ncalls = idx + 1;
|
||||
const cJSON *fn = cJSON_GetObjectItem(tc, "function");
|
||||
const cJSON *nm = cJSON_GetObjectItem(fn, "name");
|
||||
const cJSON *ar = cJSON_GetObjectItem(fn, "arguments");
|
||||
if (cJSON_IsString(nm) && nm->valuestring[0])
|
||||
snprintf(t->names[idx], sizeof(t->names[idx]), "%s", nm->valuestring);
|
||||
if (cJSON_IsString(ar))
|
||||
sb_add(&t->args[idx], ar->valuestring, strlen(ar->valuestring));
|
||||
}
|
||||
cJSON_Delete(j);
|
||||
}
|
||||
free(line);
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* --- CTL side ------------------------------------------------------------- */
|
||||
|
||||
typedef struct {
|
||||
int n;
|
||||
char sig[MAXC][512]; /* id|name|k=v... (truncated) as identity */
|
||||
} ready_t;
|
||||
|
||||
static void on_ctl(const ctl_event_t *ev, void *ud) {
|
||||
ready_t *r = ud;
|
||||
if (ev->type != CTL_EV_CALL_READY || r->n >= MAXC)
|
||||
return;
|
||||
char *s = r->sig[r->n++];
|
||||
int o = snprintf(s, 512, "%s|%s", ev->call->id, ev->call->name);
|
||||
for (int i = 0; i < ev->call->nargs && o < 500; i++)
|
||||
o += snprintf(s + o, (size_t)(512 - o), "|%s=%.*s", ev->call->args[i].key,
|
||||
(int)(ev->call->args[i].value_len > 200
|
||||
? 200
|
||||
: ev->call->args[i].value_len),
|
||||
ev->call->args[i].value);
|
||||
}
|
||||
|
||||
static void ctl_ready(const char *s, size_t n, int finish, ready_t *r) {
|
||||
memset(r, 0, sizeof(*r));
|
||||
ctl_parser_t *p = ctl_parser_create(on_ctl, r);
|
||||
ctl_parser_feed(p, s, n);
|
||||
if (finish)
|
||||
ctl_parser_finish(p);
|
||||
ctl_parser_destroy(p);
|
||||
}
|
||||
|
||||
/* --- JSON side ------------------------------------------------------------ */
|
||||
|
||||
static void build_json_stream(const trace_t *t, sbuf_t *out) {
|
||||
sb_add(out, "[", 1);
|
||||
for (int i = 0; i < t->ncalls; i++) {
|
||||
char head[160];
|
||||
int hn = snprintf(head, sizeof(head), "%s{\"name\":\"%s\",\"arguments\":",
|
||||
i ? "," : "", t->names[i]);
|
||||
sb_add(out, head, (size_t)hn);
|
||||
if (t->args[i].len)
|
||||
sb_add(out, t->args[i].buf, t->args[i].len);
|
||||
else
|
||||
sb_add(out, "{}", 2);
|
||||
sb_add(out, "}", 1);
|
||||
}
|
||||
sb_add(out, "]", 1);
|
||||
}
|
||||
|
||||
static int json_whole(const char *s, size_t n) {
|
||||
cJSON *j = cJSON_ParseWithLength(s, n);
|
||||
int k = cJSON_IsArray(j) ? cJSON_GetArraySize(j) : 0;
|
||||
cJSON_Delete(j);
|
||||
return k;
|
||||
}
|
||||
|
||||
static int json_objects(const char *s, size_t n) {
|
||||
int k = 0;
|
||||
size_t off = 0;
|
||||
while (off < n) {
|
||||
cst_json_tool_t t;
|
||||
const char *p = memchr(s + off, '{', n - off);
|
||||
if (!p)
|
||||
break;
|
||||
if (!cst_json_try_parse_tool(p, n - (size_t)(p - s), &t))
|
||||
break;
|
||||
k++;
|
||||
/* skip past this object */
|
||||
const char *end = NULL;
|
||||
cJSON *j = cJSON_ParseWithLengthOpts(p, n - (size_t)(p - s), &end, 0);
|
||||
cJSON_Delete(j);
|
||||
if (!end || end <= p)
|
||||
break;
|
||||
off = (size_t)(end - s);
|
||||
}
|
||||
return k;
|
||||
}
|
||||
|
||||
/* --- experiment ----------------------------------------------------------- */
|
||||
|
||||
static void report_row(const char *label, size_t n, const int *at_pct,
|
||||
int total) {
|
||||
printf(" %-26s bytes=%-6zu calls=%d executable@25/50/75/90/100%%: "
|
||||
"%d/%d/%d/%d/%d\n",
|
||||
label, n, total, at_pct[0], at_pct[1], at_pct[2], at_pct[3],
|
||||
at_pct[4]);
|
||||
}
|
||||
|
||||
static const int PCTS[5] = {25, 50, 75, 90, 100};
|
||||
|
||||
static void run_ctl(const char *label, const sbuf_t *c) {
|
||||
ready_t full;
|
||||
ctl_ready(c->buf, c->len, 1, &full);
|
||||
int prev = 0, at[5] = {0};
|
||||
size_t first_ready_at = 0;
|
||||
for (size_t cut = 0; cut <= c->len; cut++) {
|
||||
ready_t r;
|
||||
ctl_ready(c->buf, cut, cut == c->len, &r);
|
||||
EXPECT(r.n >= prev, "S3 monotone");
|
||||
EXPECT(r.n <= full.n, "S1 never more than the full stream");
|
||||
for (int i = 0; i < r.n && i < full.n; i++)
|
||||
EXPECT(strcmp(r.sig[i], full.sig[i]) == 0, "S2 prefix-consistent call");
|
||||
if (r.n > 0 && prev == 0)
|
||||
first_ready_at = cut;
|
||||
prev = r.n;
|
||||
for (int k = 0; k < 5; k++)
|
||||
if (cut == c->len * (size_t)PCTS[k] / 100)
|
||||
at[k] = r.n;
|
||||
}
|
||||
report_row(label, c->len, at, full.n);
|
||||
if (full.n > 0)
|
||||
printf(" %-26s first call executable at byte %zu (%.0f%% of message)\n",
|
||||
"", first_ready_at, 100.0 * (double)first_ready_at / (double)c->len);
|
||||
}
|
||||
|
||||
static void run_native(const char *label, const trace_t *t) {
|
||||
sbuf_t js = {0};
|
||||
build_json_stream(t, &js);
|
||||
int whole_full = json_whole(js.buf, js.len);
|
||||
int obj_full = json_objects(js.buf, js.len);
|
||||
EXPECT(whole_full == t->ncalls, "json-whole parses at full length");
|
||||
EXPECT(obj_full == t->ncalls, "json-object parses all at full length");
|
||||
int at_w[5] = {0}, at_o[5] = {0}, prev_o = 0;
|
||||
for (size_t cut = 0; cut <= js.len; cut++) {
|
||||
int w = json_whole(js.buf, cut);
|
||||
int o = json_objects(js.buf, cut);
|
||||
if (cut < js.len)
|
||||
EXPECT(w == 0, "json-whole executes nothing before the end");
|
||||
EXPECT(o >= prev_o, "S3 monotone (json-object)");
|
||||
prev_o = o;
|
||||
for (int k = 0; k < 5; k++) {
|
||||
if (cut == js.len * (size_t)PCTS[k] / 100) {
|
||||
at_w[k] = w;
|
||||
at_o[k] = o;
|
||||
}
|
||||
}
|
||||
}
|
||||
char l[80];
|
||||
snprintf(l, sizeof(l), "%s json-whole", label);
|
||||
report_row(l, js.len, at_w, whole_full);
|
||||
snprintf(l, sizeof(l), "%s json-object", label);
|
||||
report_row(l, js.len, at_o, obj_full);
|
||||
free(js.buf);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
static const char *dirs[] = {"tests/fixtures/sse/deepseek-ctl-heredoc",
|
||||
"tests/fixtures/sse/deepseek-ctl",
|
||||
"tests/fixtures/sse/deepseek-native-eos"};
|
||||
int traces = 0;
|
||||
for (size_t d = 0; d < sizeof(dirs) / sizeof(dirs[0]); d++) {
|
||||
printf("%s\n", dirs[d]);
|
||||
for (int seq = 0; seq < 64; seq++) {
|
||||
char path[512];
|
||||
snprintf(path, sizeof(path), "%s/%04d.sse", dirs[d], seq);
|
||||
if (access(path, R_OK) != 0)
|
||||
break;
|
||||
trace_t t;
|
||||
if (load_trace(path, &t) != 0)
|
||||
continue;
|
||||
traces++;
|
||||
char label[64];
|
||||
snprintf(label, sizeof(label), "#%04d", seq);
|
||||
if (t.ncalls > 0)
|
||||
run_native(label, &t);
|
||||
else if (t.content.len > 0 && strstr(t.content.buf, "call "))
|
||||
run_ctl(label, &t.content);
|
||||
else
|
||||
printf(" %-26s (final answer, no calls)\n", label);
|
||||
trace_free(&t);
|
||||
}
|
||||
}
|
||||
if (traces == 0)
|
||||
printf("(no recorded traces found; run from the repo root)\n");
|
||||
if (nfail) {
|
||||
fprintf(stderr, "test_replay_real: %d failed\n", nfail);
|
||||
return 1;
|
||||
}
|
||||
printf("test_replay_real: OK\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include "cJSON.h"
|
||||
#include "cst_agent.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static int nfail;
|
||||
|
||||
#define EXPECT(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
fprintf(stderr, "FAIL %s:%d: %s\n", __FILE__, __LINE__, msg); \
|
||||
nfail++; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static const char *TRICKY = "tab\there \"q\" back\\slash\nnew line \x01 中文";
|
||||
static const char *TC = "[{\"id\":\"c1\",\"type\":\"function\",\"function\":{"
|
||||
"\"name\":\"read_file\",\"arguments\":"
|
||||
"\"{\\\"path\\\":\\\"a.c\\\"}\"}}]";
|
||||
|
||||
/* compare JSON texts structurally */
|
||||
static int json_eq(const char *a, const char *b) {
|
||||
cJSON *ja = cJSON_Parse(a), *jb = cJSON_Parse(b);
|
||||
int eq = ja && jb && cJSON_Compare(ja, jb, 1);
|
||||
cJSON_Delete(ja);
|
||||
cJSON_Delete(jb);
|
||||
return eq;
|
||||
}
|
||||
|
||||
static void append(cst_session_t *s, cst_role_t role, const char *content,
|
||||
const char *tid, const char *tname, const char *tc,
|
||||
const char *meta) {
|
||||
cst_message_t m;
|
||||
memset(&m, 0, sizeof(m));
|
||||
m.role = role;
|
||||
m.content = (char *)content;
|
||||
if (tid)
|
||||
snprintf(m.tool_call_id, sizeof(m.tool_call_id), "%s", tid);
|
||||
if (tname)
|
||||
snprintf(m.tool_name, sizeof(m.tool_name), "%s", tname);
|
||||
m.tool_calls_json = (char *)tc;
|
||||
m.meta_json = (char *)meta;
|
||||
EXPECT(cst_session_append(s, &m) == 0, "append");
|
||||
}
|
||||
|
||||
static void check_messages(cst_session_t *s) {
|
||||
EXPECT(cst_session_count(s) == 5, "5 messages");
|
||||
const cst_message_t *m = cst_session_get(s, 0);
|
||||
EXPECT(m && m->role == CST_ROLE_SYSTEM, "system role");
|
||||
m = cst_session_get(s, 1);
|
||||
EXPECT(m && m->role == CST_ROLE_USER && strcmp(m->content, TRICKY) == 0,
|
||||
"tricky user text exact");
|
||||
m = cst_session_get(s, 2);
|
||||
EXPECT(m && m->role == CST_ROLE_ASSISTANT, "assistant role");
|
||||
EXPECT(m && m->tool_calls_json && json_eq(m->tool_calls_json, TC),
|
||||
"tool_calls preserved");
|
||||
EXPECT(m && m->meta_json && json_eq(m->meta_json, "{\"protocol\":\"native-eos\"}"),
|
||||
"assistant meta");
|
||||
m = cst_session_get(s, 3);
|
||||
EXPECT(m && m->role == CST_ROLE_TOOL && strcmp(m->tool_call_id, "c1") == 0 &&
|
||||
strcmp(m->tool_name, "read_file") == 0,
|
||||
"tool id/name");
|
||||
EXPECT(m && strcmp(m->content, "int a;\n\tx\n") == 0, "tool content");
|
||||
m = cst_session_get(s, 4);
|
||||
EXPECT(m && m->role == CST_ROLE_USER && strcmp(m->tool_call_id, "c2") == 0,
|
||||
"text-protocol result frame keeps tool_call_id");
|
||||
EXPECT(m && m->meta_json &&
|
||||
json_eq(m->meta_json,
|
||||
"{\"kind\":\"tool_result\",\"protocol\":\"ctl\"}"),
|
||||
"result frame meta");
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
char path[256];
|
||||
snprintf(path, sizeof(path), "/tmp/cst-session-test-%d.jsonl", (int)getpid());
|
||||
remove(path);
|
||||
|
||||
cst_session_t *s = cst_session_open(path);
|
||||
EXPECT(s != NULL, "open new");
|
||||
if (!s)
|
||||
return 1;
|
||||
append(s, CST_ROLE_SYSTEM, "sys", NULL, NULL, NULL, NULL);
|
||||
append(s, CST_ROLE_USER, TRICKY, NULL, NULL, NULL, NULL);
|
||||
append(s, CST_ROLE_ASSISTANT, "", NULL, NULL, TC,
|
||||
"{\"protocol\":\"native-eos\"}");
|
||||
append(s, CST_ROLE_TOOL, "int a;\n\tx\n", "c1", "read_file", NULL, NULL);
|
||||
append(s, CST_ROLE_USER, "result c2 exit=0 2\nok\nend", "c2", "run_shell",
|
||||
NULL, "{\"kind\":\"tool_result\",\"protocol\":\"ctl\"}");
|
||||
check_messages(s);
|
||||
cst_session_close(s);
|
||||
|
||||
/* reload from disk */
|
||||
s = cst_session_open(path);
|
||||
EXPECT(s != NULL, "reopen");
|
||||
if (!s)
|
||||
return 1;
|
||||
check_messages(s);
|
||||
|
||||
/* every line on disk is standalone valid JSON with tool_calls as array */
|
||||
FILE *fp = fopen(path, "r");
|
||||
char line[8192];
|
||||
int lines = 0, arrays = 0;
|
||||
while (fp && fgets(line, sizeof(line), fp)) {
|
||||
cJSON *j = cJSON_Parse(line);
|
||||
EXPECT(j != NULL, "jsonl line parses");
|
||||
if (cJSON_IsArray(cJSON_GetObjectItemCaseSensitive(j, "tool_calls")))
|
||||
arrays++;
|
||||
cJSON_Delete(j);
|
||||
lines++;
|
||||
}
|
||||
if (fp)
|
||||
fclose(fp);
|
||||
EXPECT(lines == 5 && arrays == 1, "5 lines, tool_calls stored as array");
|
||||
|
||||
/* rewrite + clear(keep_system) */
|
||||
const cst_message_t *first = cst_session_get(s, 0);
|
||||
cst_message_t keep[2];
|
||||
keep[0] = *first;
|
||||
keep[1] = *cst_session_get(s, 1);
|
||||
EXPECT(cst_session_rewrite(s, keep, 2) == 0, "rewrite");
|
||||
EXPECT(cst_session_count(s) == 2, "rewrite count");
|
||||
EXPECT(cst_session_clear(s, 1) == 0 && cst_session_count(s) == 1,
|
||||
"clear keeps system");
|
||||
cst_session_close(s);
|
||||
|
||||
/* legacy format: tool_calls_json stored as a string */
|
||||
fp = fopen(path, "w");
|
||||
fprintf(fp, "{\"role\":\"assistant\",\"content\":\"\",\"tool_calls_json\":"
|
||||
"\"[{\\\"id\\\":\\\"c9\\\",\\\"type\\\":\\\"function\\\","
|
||||
"\\\"function\\\":{\\\"name\\\":\\\"run_shell\\\","
|
||||
"\\\"arguments\\\":\\\"{}\\\"}}]\"}\n");
|
||||
fprintf(fp, "not json at all\n");
|
||||
fprintf(fp, "{\"role\":\"tool\",\"content\":\"out\",\"tool_call_id\":\"c9\"}\n");
|
||||
fclose(fp);
|
||||
s = cst_session_open(path);
|
||||
EXPECT(s != NULL, "open legacy");
|
||||
if (s) {
|
||||
EXPECT(cst_session_count(s) == 2, "legacy: bad line skipped");
|
||||
const cst_message_t *m = cst_session_get(s, 0);
|
||||
EXPECT(m && m->tool_calls_json && strstr(m->tool_calls_json, "c9"),
|
||||
"legacy tool_calls_json read");
|
||||
cst_session_close(s);
|
||||
}
|
||||
remove(path);
|
||||
|
||||
if (nfail) {
|
||||
fprintf(stderr, "test_session_roundtrip: %d failed\n", nfail);
|
||||
return 1;
|
||||
}
|
||||
printf("test_session_roundtrip: OK\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include "cst_agent.h"
|
||||
#include "os_compat.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* run_shell must never hang the agent: timeout kills the whole process
|
||||
* group, stdin is empty, huge output is capped. */
|
||||
|
||||
static int nfail;
|
||||
|
||||
#define EXPECT(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
fprintf(stderr, "FAIL %s:%d: %s\n", __FILE__, __LINE__, msg); \
|
||||
nfail++; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static char g_ws[256];
|
||||
|
||||
static int sh(const char *cmd, cst_tool_result_t *r, double *ms) {
|
||||
ctl_tool_call_t c;
|
||||
memset(&c, 0, sizeof(c));
|
||||
snprintf(c.id, sizeof(c.id), "s");
|
||||
snprintf(c.name, sizeof(c.name), "run_shell");
|
||||
snprintf(c.args[0].key, sizeof(c.args[0].key), "cmd");
|
||||
c.args[0].value = (char *)cmd;
|
||||
c.args[0].value_len = strlen(cmd);
|
||||
c.nargs = 1;
|
||||
memset(r, 0, sizeof(*r));
|
||||
double t0 = os_now_ms();
|
||||
cst_tool_dispatch(g_ws, &c, r);
|
||||
*ms = os_now_ms() - t0;
|
||||
return r->exit_code;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
snprintf(g_ws, sizeof(g_ws), "/tmp/cst-shell-test-%d", (int)getpid());
|
||||
mkdir(g_ws, 0755);
|
||||
cst_tool_result_t r;
|
||||
double ms;
|
||||
|
||||
EXPECT(sh("echo hi; exit 3", &r, &ms) == 3, "exit code passed through");
|
||||
EXPECT(r.out && strstr(r.out, "hi"), "stdout captured");
|
||||
cst_tool_result_free(&r);
|
||||
|
||||
/* stdin is /dev/null: a command reading stdin returns at once */
|
||||
sh("cat; echo done", &r, &ms);
|
||||
EXPECT(r.out && strstr(r.out, "done") && ms < 5000, "stdin is empty");
|
||||
cst_tool_result_free(&r);
|
||||
|
||||
/* timeout kills the process group, including background children that
|
||||
* keep the output pipe open */
|
||||
setenv("CST_SHELL_TIMEOUT", "1", 1);
|
||||
os_set_run_timeout(1);
|
||||
int ec = sh("sleep 30 & sleep 30; echo never", &r, &ms);
|
||||
EXPECT(ec == 124, "timeout exit code 124");
|
||||
EXPECT(ms < 8000, "timeout returns promptly");
|
||||
EXPECT(!r.out || !strstr(r.out, "never"), "command was stopped");
|
||||
cst_tool_result_free(&r);
|
||||
os_set_run_timeout(0);
|
||||
unsetenv("CST_SHELL_TIMEOUT");
|
||||
|
||||
/* the shell exits but leaves a background child holding the pipe */
|
||||
ec = sh("sleep 30 & echo started", &r, &ms);
|
||||
EXPECT(ec == 0, "shell exit code kept when a background child lingers");
|
||||
EXPECT(r.out && strstr(r.out, "started"), "foreground output kept");
|
||||
EXPECT(ms < 5000, "lingering background child does not block");
|
||||
cst_tool_result_free(&r);
|
||||
|
||||
/* huge output: capped and marked, the child is not blocked on the pipe */
|
||||
sh("head -c 5000000 /dev/zero | tr '\\0' x; echo; echo tail-marker", &r, &ms);
|
||||
EXPECT(r.out && r.out_len < 2000000, "output capped");
|
||||
EXPECT(r.out && strstr(r.out, "truncated"), "truncation noted");
|
||||
EXPECT(ms < 20000, "large output does not hang");
|
||||
cst_tool_result_free(&r);
|
||||
|
||||
char cmd[300];
|
||||
snprintf(cmd, sizeof(cmd), "rm -rf %s", g_ws);
|
||||
if (system(cmd) != 0)
|
||||
fprintf(stderr, "warning: cleanup failed\n");
|
||||
if (nfail) {
|
||||
fprintf(stderr, "test_shell: %d failed\n", nfail);
|
||||
return 1;
|
||||
}
|
||||
printf("test_shell: OK\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,301 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include "cJSON.h"
|
||||
#include "cst_agent.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Drives cst_llm_chat_stream through CST_REPLAY_SSE with synthetic and
|
||||
* recorded (tests/fixtures/sse) streams, at several network chunk sizes. */
|
||||
|
||||
static int nfail;
|
||||
|
||||
#define EXPECT(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
fprintf(stderr, "FAIL %s:%d: %s\n", __FILE__, __LINE__, msg); \
|
||||
nfail++; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define MAX_CALLS 16
|
||||
|
||||
typedef struct {
|
||||
char text[65536];
|
||||
size_t text_len;
|
||||
int ncalls;
|
||||
char ids[MAX_CALLS][64];
|
||||
char names[MAX_CALLS][64];
|
||||
char *args[MAX_CALLS]; /* NULL = invalid */
|
||||
int args_null[MAX_CALLS];
|
||||
int nopen;
|
||||
int open_before_first_call; /* opens seen before the first call fired */
|
||||
} capture_t;
|
||||
|
||||
static void on_delta(const char *d, size_t n, void *ud) {
|
||||
capture_t *c = ud;
|
||||
if (c->text_len + n < sizeof(c->text)) {
|
||||
memcpy(c->text + c->text_len, d, n);
|
||||
c->text_len += n;
|
||||
c->text[c->text_len] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void on_tool(const char *id, const char *name, const char *args,
|
||||
void *ud) {
|
||||
capture_t *c = ud;
|
||||
if (c->ncalls >= MAX_CALLS)
|
||||
return;
|
||||
int i = c->ncalls++;
|
||||
snprintf(c->ids[i], sizeof(c->ids[i]), "%s", id ? id : "");
|
||||
snprintf(c->names[i], sizeof(c->names[i]), "%s", name ? name : "");
|
||||
c->args[i] = args ? strdup(args) : NULL;
|
||||
c->args_null[i] = args == NULL;
|
||||
if (i == 0)
|
||||
c->open_before_first_call = c->nopen;
|
||||
}
|
||||
|
||||
static void on_open(int index, const char *id, const char *name, void *ud) {
|
||||
(void)index;
|
||||
(void)id;
|
||||
(void)name;
|
||||
capture_t *c = ud;
|
||||
c->nopen++;
|
||||
}
|
||||
|
||||
static void capture_free(capture_t *c) {
|
||||
for (int i = 0; i < c->ncalls; i++)
|
||||
free(c->args[i]);
|
||||
}
|
||||
|
||||
static char g_dir[256];
|
||||
|
||||
static void write_fixture(const char *sse) {
|
||||
char path[512];
|
||||
snprintf(path, sizeof(path), "%s/0000.sse", g_dir);
|
||||
FILE *fp = fopen(path, "wb");
|
||||
fputs(sse, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
static int replay(const char *dir, int seq, const char *chunk, capture_t *c,
|
||||
cst_llm_stats_t *st) {
|
||||
memset(c, 0, sizeof(*c));
|
||||
memset(st, 0, sizeof(*st));
|
||||
setenv("CST_REPLAY_SSE", dir, 1);
|
||||
setenv("CST_REPLAY_CHUNK", chunk, 1);
|
||||
cst_llm_trace_reset();
|
||||
for (int i = 0; i < seq; i++) {
|
||||
/* advance the sequence counter to the wanted file */
|
||||
cst_llm_request_t skip;
|
||||
memset(&skip, 0, sizeof(skip));
|
||||
skip.api_base = "http://replay";
|
||||
skip.model = "m";
|
||||
char e[64];
|
||||
capture_t tmp;
|
||||
memset(&tmp, 0, sizeof(tmp));
|
||||
skip.userdata = &tmp;
|
||||
cst_llm_chat_stream(&skip, e, sizeof(e));
|
||||
}
|
||||
cst_llm_request_t r;
|
||||
memset(&r, 0, sizeof(r));
|
||||
r.api_base = "http://replay";
|
||||
r.model = "m";
|
||||
r.on_delta = on_delta;
|
||||
r.on_native_tool = on_tool;
|
||||
r.on_native_open = on_open;
|
||||
r.userdata = c;
|
||||
r.stats = st;
|
||||
char err[256];
|
||||
return cst_llm_chat_stream(&r, err, sizeof(err));
|
||||
}
|
||||
|
||||
static const char *CHUNKS[] = {"1", "7", "64", "4096"};
|
||||
#define NCHUNKS 4
|
||||
|
||||
static void test_text_reasoning_usage(void) {
|
||||
write_fixture(
|
||||
"data: {\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\","
|
||||
"\"reasoning_content\":\"plan \"}}]}\n\n"
|
||||
"data: {\"choices\":[{\"index\":0,\"delta\":{\"reasoning_content\":"
|
||||
"\"more\"}}]}\r\n\r\n"
|
||||
": keep-alive comment\n\n"
|
||||
"data: {\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hel\"}}]}\n\n"
|
||||
"data:{\"choices\":[{\"index\":0,\"delta\":{\"content\":\"lo\\t\\u4e2d\"},"
|
||||
"\"finish_reason\":\"stop\"}]}\n\n"
|
||||
"data: {\"choices\":[],\"usage\":{\"prompt_tokens\":11,"
|
||||
"\"completion_tokens\":5,\"prompt_cache_hit_tokens\":8}}\n\n"
|
||||
"data: [DONE]\n\n");
|
||||
for (int k = 0; k < NCHUNKS; k++) {
|
||||
capture_t c;
|
||||
cst_llm_stats_t st;
|
||||
int rc = replay(g_dir, 0, CHUNKS[k], &c, &st);
|
||||
EXPECT(rc == 0, "text stream ok");
|
||||
EXPECT(strcmp(c.text, "<think>plan more</think>Hello\t\xe4\xb8\xad") == 0,
|
||||
"reasoning wrapped + content decoded");
|
||||
EXPECT(strcmp(st.finish_reason, "stop") == 0, "finish_reason");
|
||||
EXPECT(st.prompt_tokens == 11 && st.completion_tokens == 5 &&
|
||||
st.cached_tokens == 8,
|
||||
"usage incl. deepseek cache hits");
|
||||
EXPECT(c.ncalls == 0, "no calls");
|
||||
capture_free(&c);
|
||||
}
|
||||
}
|
||||
|
||||
/* Two parallel calls, fragmented arguments, no [DONE] and no final newline. */
|
||||
static void test_parallel_calls(void) {
|
||||
write_fixture(
|
||||
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"index\":0,\"id\":"
|
||||
"\"c1\",\"type\":\"function\",\"function\":{\"name\":\"read_file\","
|
||||
"\"arguments\":\"\"}}]}}]}\n\n"
|
||||
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"index\":0,"
|
||||
"\"function\":{\"arguments\":\"{\\\"pa\"}}]}}]}\n\n"
|
||||
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"index\":0,"
|
||||
"\"function\":{\"arguments\":\"th\\\":\\\"a.c\\\"}\"}}]}}]}\n\n"
|
||||
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"index\":1,\"id\":"
|
||||
"\"c2\",\"function\":{\"name\":\"run_shell\",\"arguments\":"
|
||||
"\"{\\\"cmd\\\":\"}}]}}]}\n\n"
|
||||
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"index\":1,"
|
||||
"\"function\":{\"arguments\":\"\\\"make\\\\ttest\\\"}\"}}]}}]}\n\n"
|
||||
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"tool_calls\"}]}");
|
||||
for (int k = 0; k < NCHUNKS; k++) {
|
||||
capture_t c;
|
||||
cst_llm_stats_t st;
|
||||
int rc = replay(g_dir, 0, CHUNKS[k], &c, &st);
|
||||
EXPECT(rc == 0, "parallel stream ok");
|
||||
EXPECT(c.ncalls == 2, "two calls");
|
||||
if (c.ncalls == 2) {
|
||||
EXPECT(strcmp(c.ids[0], "c1") == 0 && strcmp(c.names[0], "read_file") == 0,
|
||||
"call 1 id/name");
|
||||
EXPECT(c.args[0] && strcmp(c.args[0], "{\"path\":\"a.c\"}") == 0,
|
||||
"call 1 args reassembled");
|
||||
EXPECT(strcmp(c.ids[1], "c2") == 0 && strcmp(c.names[1], "run_shell") == 0,
|
||||
"call 2 id/name");
|
||||
EXPECT(c.args[1] && strcmp(c.args[1], "{\"cmd\":\"make\\ttest\"}") == 0,
|
||||
"call 2 args reassembled");
|
||||
/* native-inc: call 1 is complete as soon as index 1 starts, before its
|
||||
* open event and long before finish_reason */
|
||||
EXPECT(c.open_before_first_call == 1, "call 1 fired when index 1 began");
|
||||
}
|
||||
EXPECT(c.nopen == 2, "two opens");
|
||||
EXPECT(strcmp(st.finish_reason, "tool_calls") == 0, "finish tool_calls");
|
||||
capture_free(&c);
|
||||
}
|
||||
}
|
||||
|
||||
/* Gateways that reuse index 0 for every call but change the id. */
|
||||
static void test_same_index_new_id(void) {
|
||||
write_fixture(
|
||||
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"index\":0,\"id\":"
|
||||
"\"a\",\"function\":{\"name\":\"read_file\",\"arguments\":"
|
||||
"\"{\\\"path\\\":\\\"x\\\"}\"}}]}}]}\n\n"
|
||||
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"index\":0,\"id\":"
|
||||
"\"b\",\"function\":{\"name\":\"read_file\",\"arguments\":"
|
||||
"\"{\\\"path\\\":\\\"y\\\"}\"}}]}}]}\n\n"
|
||||
"data: [DONE]\n\n");
|
||||
capture_t c;
|
||||
cst_llm_stats_t st;
|
||||
replay(g_dir, 0, "4096", &c, &st);
|
||||
EXPECT(c.ncalls == 2, "same index, new id -> two calls");
|
||||
if (c.ncalls == 2)
|
||||
EXPECT(c.args[1] && strstr(c.args[1], "\"y\""), "second call args");
|
||||
capture_free(&c);
|
||||
}
|
||||
|
||||
static void test_invalid_args_and_error(void) {
|
||||
write_fixture(
|
||||
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"index\":0,\"id\":"
|
||||
"\"c1\",\"function\":{\"name\":\"write_file\",\"arguments\":"
|
||||
"\"{\\\"path\\\":\\\"a\"}}]}}]}\n\n"
|
||||
"data: [DONE]\n\n");
|
||||
capture_t c;
|
||||
cst_llm_stats_t st;
|
||||
replay(g_dir, 0, "3", &c, &st);
|
||||
EXPECT(c.ncalls == 1 && c.args_null[0], "truncated args -> NULL");
|
||||
capture_free(&c);
|
||||
|
||||
write_fixture("data: {\"error\":{\"message\":\"quota exceeded\"}}\n\n");
|
||||
int rc = replay(g_dir, 0, "4096", &c, &st);
|
||||
EXPECT(rc != 0, "in-stream error fails the request");
|
||||
EXPECT(strstr(st.error, "quota exceeded") != NULL, "error message kept");
|
||||
capture_free(&c);
|
||||
}
|
||||
|
||||
static int file_exists(const char *p) { return access(p, R_OK) == 0; }
|
||||
|
||||
/* Recorded DeepSeek traces: every call must decode to a JSON object and the
|
||||
* decoded result must not depend on the network chunking. */
|
||||
static void test_recorded(void) {
|
||||
const char *dir = "tests/fixtures/sse/deepseek-native-eos";
|
||||
char p[512];
|
||||
snprintf(p, sizeof(p), "%s/0000.sse", dir);
|
||||
if (!file_exists(p)) {
|
||||
printf(" (skip recorded traces: %s missing)\n", p);
|
||||
return;
|
||||
}
|
||||
int total_calls = 0;
|
||||
for (int seq = 0; seq < 16; seq++) {
|
||||
snprintf(p, sizeof(p), "%s/%04d.sse", dir, seq);
|
||||
if (!file_exists(p))
|
||||
break;
|
||||
capture_t ref;
|
||||
cst_llm_stats_t st;
|
||||
EXPECT(replay(dir, seq, "4096", &ref, &st) == 0, "recorded replay ok");
|
||||
for (int i = 0; i < ref.ncalls; i++) {
|
||||
cJSON *j = ref.args[i] ? cJSON_Parse(ref.args[i]) : NULL;
|
||||
EXPECT(cJSON_IsObject(j), "recorded call args are a JSON object");
|
||||
EXPECT(cst_tool_known(ref.names[i]), "recorded call names a known tool");
|
||||
cJSON_Delete(j);
|
||||
}
|
||||
total_calls += ref.ncalls;
|
||||
EXPECT(st.prompt_tokens > 0, "recorded usage present");
|
||||
capture_t one;
|
||||
replay(dir, seq, "1", &one, &st);
|
||||
EXPECT(one.ncalls == ref.ncalls, "chunking does not change calls");
|
||||
EXPECT(one.text_len == ref.text_len &&
|
||||
memcmp(one.text, ref.text, ref.text_len) == 0,
|
||||
"chunking does not change text");
|
||||
for (int i = 0; i < one.ncalls && i < ref.ncalls; i++)
|
||||
EXPECT(one.args[i] && ref.args[i] && strcmp(one.args[i], ref.args[i]) == 0,
|
||||
"chunking does not change args");
|
||||
capture_free(&one);
|
||||
capture_free(&ref);
|
||||
}
|
||||
EXPECT(total_calls > 0, "recorded native trace contains tool calls");
|
||||
|
||||
const char *hd = "tests/fixtures/sse/deepseek-ctl-heredoc";
|
||||
snprintf(p, sizeof(p), "%s/0000.sse", hd);
|
||||
if (file_exists(p)) {
|
||||
capture_t c;
|
||||
cst_llm_stats_t st;
|
||||
replay(hd, 0, "5", &c, &st);
|
||||
EXPECT(strstr(c.text, "call ") != NULL, "ctl trace carries CTL text");
|
||||
EXPECT(c.ncalls == 0, "text protocol: no native calls");
|
||||
capture_free(&c);
|
||||
}
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
snprintf(g_dir, sizeof(g_dir), "/tmp/cst-sse-test-%d", (int)getpid());
|
||||
char cmd[300];
|
||||
snprintf(cmd, sizeof(cmd), "mkdir -p %s", g_dir);
|
||||
if (system(cmd) != 0)
|
||||
return 1;
|
||||
test_text_reasoning_usage();
|
||||
test_parallel_calls();
|
||||
test_same_index_new_id();
|
||||
test_invalid_args_and_error();
|
||||
test_recorded();
|
||||
snprintf(cmd, sizeof(cmd), "rm -rf %s", g_dir);
|
||||
if (system(cmd) != 0)
|
||||
fprintf(stderr, "warning: cleanup failed\n");
|
||||
if (nfail) {
|
||||
fprintf(stderr, "test_sse_decode: %d failed\n", nfail);
|
||||
return 1;
|
||||
}
|
||||
printf("test_sse_decode: OK\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,372 @@
|
||||
/* Built-in workspace tools: read ranges, list_dir, glob, grep, edit_file,
|
||||
* delete/move, todo_write, ask_user, previews and the sandbox. */
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include "cst_agent.h"
|
||||
#include "cst_tools.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static int nfail;
|
||||
|
||||
#define EXPECT(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
fprintf(stderr, "FAIL %s:%d: %s\n", __FILE__, __LINE__, msg); \
|
||||
nfail++; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static char g_ws[256];
|
||||
static char g_todo[512];
|
||||
|
||||
static void wfile(const char *rel, const char *s) {
|
||||
char p[512];
|
||||
snprintf(p, sizeof(p), "%s/%s", g_ws, rel);
|
||||
FILE *fp = fopen(p, "wb");
|
||||
if (fp) {
|
||||
fputs(s, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
static char *rfile(const char *rel) {
|
||||
char p[512];
|
||||
snprintf(p, sizeof(p), "%s/%s", g_ws, rel);
|
||||
FILE *fp = fopen(p, "rb");
|
||||
if (!fp)
|
||||
return NULL;
|
||||
static char buf[65536];
|
||||
size_t n = fread(buf, 1, sizeof(buf) - 1, fp);
|
||||
buf[n] = 0;
|
||||
fclose(fp);
|
||||
return buf;
|
||||
}
|
||||
|
||||
static int exists(const char *rel) {
|
||||
char p[512];
|
||||
struct stat st;
|
||||
snprintf(p, sizeof(p), "%s/%s", g_ws, rel);
|
||||
return stat(p, &st) == 0;
|
||||
}
|
||||
|
||||
static void set_todo(const char *text, void *ud) {
|
||||
(void)ud;
|
||||
snprintf(g_todo, sizeof(g_todo), "%s", text);
|
||||
}
|
||||
|
||||
static int ask_yes(const char *q, const char *o, char *ans, size_t n,
|
||||
void *ud) {
|
||||
(void)q;
|
||||
(void)o;
|
||||
(void)ud;
|
||||
snprintf(ans, n, "yes please");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* name, then key/value pairs, NULL-terminated. */
|
||||
static ctl_tool_call_t mk(const char *name, ...) {
|
||||
ctl_tool_call_t c;
|
||||
memset(&c, 0, sizeof(c));
|
||||
snprintf(c.id, sizeof(c.id), "t");
|
||||
snprintf(c.name, sizeof(c.name), "%s", name);
|
||||
va_list ap;
|
||||
va_start(ap, name);
|
||||
const char *k;
|
||||
while ((k = va_arg(ap, const char *)) != NULL) {
|
||||
const char *v = va_arg(ap, const char *);
|
||||
ctl_arg_t *a = &c.args[c.nargs++];
|
||||
snprintf(a->key, sizeof(a->key), "%s", k);
|
||||
a->value = (char *)v;
|
||||
a->value_len = strlen(v);
|
||||
}
|
||||
va_end(ap);
|
||||
return c;
|
||||
}
|
||||
|
||||
static int run(cst_tool_ctx_t *ctx, ctl_tool_call_t c, cst_tool_result_t *r) {
|
||||
memset(r, 0, sizeof(*r));
|
||||
cst_tool_run(ctx, &c, r);
|
||||
return r->exit_code;
|
||||
}
|
||||
|
||||
static void reset(cst_tool_result_t *r) { cst_tool_result_free(r); }
|
||||
|
||||
int main(void) {
|
||||
snprintf(g_ws, sizeof(g_ws), "/tmp/cst-tools-test-%d", (int)getpid());
|
||||
mkdir(g_ws, 0755);
|
||||
char p[512];
|
||||
snprintf(p, sizeof(p), "%s/src", g_ws);
|
||||
mkdir(p, 0755);
|
||||
snprintf(p, sizeof(p), "%s/src/deep", g_ws);
|
||||
mkdir(p, 0755);
|
||||
snprintf(p, sizeof(p), "%s/node_modules", g_ws);
|
||||
mkdir(p, 0755);
|
||||
snprintf(p, sizeof(p), "%s/build", g_ws);
|
||||
mkdir(p, 0755);
|
||||
wfile("src/main.c", "#include <stdio.h>\nint main(void) {\n int x = 42;\n"
|
||||
" printf(\"%d\\n\", x);\n return 0;\n}\n");
|
||||
wfile("src/deep/util.c", "int add(int a, int b) { return a + b; }\n"
|
||||
"int sub(int a, int b) { return a - b; }\n");
|
||||
wfile("src/notes.txt", "TODO: x\n");
|
||||
wfile("node_modules/junk.c", "int add(int a, int b);\n");
|
||||
wfile("build/out.c", "int add_generated;\n");
|
||||
wfile(".gitignore", "build/\n*.log\n");
|
||||
wfile("run.log", "int add in log\n");
|
||||
{
|
||||
FILE *fp = fopen(strcat(strcpy(p, g_ws), "/lines.txt"), "w");
|
||||
for (int i = 1; i <= 100; i++)
|
||||
fprintf(fp, "line %d\n", i);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
cst_tool_ctx_t ctx;
|
||||
memset(&ctx, 0, sizeof(ctx));
|
||||
ctx.workspace_root = g_ws;
|
||||
ctx.set_todo = set_todo;
|
||||
cst_tool_result_t r;
|
||||
|
||||
/* read_file: whole, slices, numbers */
|
||||
EXPECT(run(&ctx, mk("read_file", "path", "src/notes.txt", NULL), &r) == 0 &&
|
||||
strcmp(r.out, "TODO: x\n") == 0,
|
||||
"read whole file unchanged");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("read_file", "path", "lines.txt", "offset", "10",
|
||||
"limit", "3", "line_numbers", "true", NULL),
|
||||
&r) == 0,
|
||||
"read slice ok");
|
||||
EXPECT(r.out && strstr(r.out, " 10|line 10\n 11|line 11\n 12|line 12\n"),
|
||||
"slice numbered lines");
|
||||
EXPECT(r.out && strstr(r.out, "next offset=13"), "slice continuation hint");
|
||||
EXPECT(r.out && !strstr(r.out, "line 13\n"), "slice limit respected");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("read_file", "path", "lines.txt", "offset", "\"99\"",
|
||||
NULL),
|
||||
&r) == 0 &&
|
||||
strstr(r.out, "line 100\n") && !strstr(r.out, "next offset"),
|
||||
"quoted offset (ctl style) reads to the end");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("read_file", "path", "lines.txt", "offset", "abc", NULL),
|
||||
&r) == 1 && strstr(r.out, "integer"),
|
||||
"non-integer offset rejected");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("read_file", "path", "src", NULL), &r) == 1 &&
|
||||
strstr(r.out, "list_dir"),
|
||||
"directory read suggests list_dir");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("read_file", "path", "../../etc/passwd", NULL), &r) == 1,
|
||||
"read outside workspace denied");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("read_file", NULL), &r) == 1 &&
|
||||
strstr(r.out, "needs argument \"path\""),
|
||||
"missing required arg");
|
||||
reset(&r);
|
||||
|
||||
/* list_dir */
|
||||
EXPECT(run(&ctx, mk("list_dir", NULL), &r) == 0, "list_dir ok");
|
||||
EXPECT(r.out && strstr(r.out, "src/") && strstr(r.out, " main.c"),
|
||||
"list_dir tree");
|
||||
EXPECT(r.out && strstr(r.out, "node_modules/ (skipped)"),
|
||||
"node_modules shown but not walked");
|
||||
EXPECT(r.out && !strstr(r.out, "junk.c"), "skipped dir contents hidden");
|
||||
EXPECT(r.out && !strstr(r.out, "build/") && !strstr(r.out, "run.log"),
|
||||
".gitignore respected");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("list_dir", "path", "src", "depth", "1", NULL), &r) == 0 &&
|
||||
strstr(r.out, "deep/") && !strstr(r.out, "util.c"),
|
||||
"list_dir depth");
|
||||
reset(&r);
|
||||
|
||||
/* glob */
|
||||
EXPECT(run(&ctx, mk("glob", "pattern", "*.c", NULL), &r) == 0, "glob ok");
|
||||
EXPECT(r.out && strstr(r.out, "src/main.c") &&
|
||||
strstr(r.out, "src/deep/util.c"),
|
||||
"basename glob matches at any depth");
|
||||
EXPECT(r.out && !strstr(r.out, "junk.c") && !strstr(r.out, "out.c"),
|
||||
"glob skips node_modules and ignored dirs");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("glob", "pattern", "src/*.c", NULL), &r) == 0 &&
|
||||
strstr(r.out, "src/main.c") && !strstr(r.out, "util.c"),
|
||||
"single-segment glob");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("glob", "pattern", "src/**/*.c", NULL), &r) == 0 &&
|
||||
strstr(r.out, "src/main.c") && strstr(r.out, "util.c"),
|
||||
"** glob");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("glob", "pattern", "*.rs", NULL), &r) == 0 &&
|
||||
strstr(r.out, "no files match"),
|
||||
"glob no match");
|
||||
reset(&r);
|
||||
|
||||
/* grep */
|
||||
EXPECT(run(&ctx, mk("grep", "pattern", "int add", NULL), &r) == 0, "grep ok");
|
||||
EXPECT(r.out && strstr(r.out, "src/deep/util.c:1:int add"), "grep hit");
|
||||
EXPECT(r.out && !strstr(r.out, "junk.c") && !strstr(r.out, "run.log"),
|
||||
"grep skips node_modules and ignored files");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("grep", "pattern", "x = \\d+", "glob", "*.c", NULL),
|
||||
&r) == 0 &&
|
||||
strstr(r.out, "src/main.c:3:"),
|
||||
"grep translates \\d");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("grep", "pattern", "RETURN", "ignore_case", "true",
|
||||
"path", "src/main.c", "context", "1", NULL),
|
||||
&r) == 0 &&
|
||||
strstr(r.out, "src/main.c:5: return 0;") &&
|
||||
strstr(r.out, "src/main.c-4-") && strstr(r.out, "src/main.c-6-"),
|
||||
"grep single file, icase, context");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("grep", "pattern", "(", NULL), &r) == 1 &&
|
||||
strstr(r.out, "bad regex"),
|
||||
"grep bad regex");
|
||||
reset(&r);
|
||||
|
||||
/* edit_file */
|
||||
EXPECT(run(&ctx, mk("edit_file", "path", "src/main.c", "old_string",
|
||||
"int x = 42;", "new_string", "int x = 7;", NULL),
|
||||
&r) == 0,
|
||||
"edit ok");
|
||||
EXPECT(r.out && strstr(r.out, "- int x = 42;") && strstr(r.out, "+ int x = 7;"),
|
||||
"edit diff");
|
||||
EXPECT(strstr(rfile("src/main.c"), "int x = 7;") != NULL, "edit written");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("edit_file", "path", "src/main.c", "old_string",
|
||||
"nothing like this", "new_string", "y", NULL),
|
||||
&r) == 1 &&
|
||||
strstr(r.out, "not found"),
|
||||
"edit not found");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("edit_file", "path", "src/deep/util.c", "old_string",
|
||||
"int a, int b", "new_string", "long a, long b", NULL),
|
||||
&r) == 1 &&
|
||||
strstr(r.out, "matches 2 places"),
|
||||
"edit ambiguous");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("edit_file", "path", "src/deep/util.c", "old_string",
|
||||
"int a, int b", "new_string", "long a, long b",
|
||||
"replace_all", "true", NULL),
|
||||
&r) == 0 &&
|
||||
strstr(r.out, "2 replacements"),
|
||||
"edit replace_all");
|
||||
reset(&r);
|
||||
wfile("crlf.txt", "one\r\ntwo\r\nthree\r\n");
|
||||
EXPECT(run(&ctx, mk("edit_file", "path", "crlf.txt", "old_string",
|
||||
"one\ntwo\n", "new_string", "1\n2\n", NULL),
|
||||
&r) == 0 &&
|
||||
strcmp(rfile("crlf.txt"), "1\r\n2\r\nthree\r\n") == 0,
|
||||
"edit keeps CRLF line endings");
|
||||
reset(&r);
|
||||
|
||||
/* previews never touch the disk */
|
||||
{
|
||||
ctl_tool_call_t c = mk("edit_file", "path", "src/main.c", "old_string",
|
||||
"return 0;", "new_string", "return 1;", NULL);
|
||||
char *pv = NULL;
|
||||
EXPECT(cst_tool_preview(&ctx, &c, &pv) == 0 && pv &&
|
||||
strstr(pv, "+ return 1;"),
|
||||
"edit preview diff");
|
||||
EXPECT(strstr(rfile("src/main.c"), "return 0;") != NULL,
|
||||
"preview did not write");
|
||||
free(pv);
|
||||
c = mk("write_file", "path", "new/dir/x.txt", "content", "hi\n", NULL);
|
||||
EXPECT(cst_tool_preview(&ctx, &c, &pv) == 0 && pv &&
|
||||
strstr(pv, "create new/dir/x.txt") && strstr(pv, "+hi"),
|
||||
"write preview for a new file");
|
||||
EXPECT(!exists("new"), "write preview did not mkdir");
|
||||
free(pv);
|
||||
c = mk("apply_patch", "patch",
|
||||
"--- a/src/notes.txt\n+++ b/src/notes.txt\n@@ -1 +1 @@\n-TODO: x\n"
|
||||
"+DONE: x\n",
|
||||
NULL);
|
||||
EXPECT(cst_tool_preview(&ctx, &c, &pv) == 0 && pv &&
|
||||
strstr(pv, "+DONE: x"),
|
||||
"patch preview");
|
||||
EXPECT(strcmp(rfile("src/notes.txt"), "TODO: x\n") == 0,
|
||||
"patch preview did not write");
|
||||
free(pv);
|
||||
}
|
||||
|
||||
/* move / delete */
|
||||
EXPECT(run(&ctx, mk("move_file", "from", "src/notes.txt", "to",
|
||||
"docs/notes.md", NULL),
|
||||
&r) == 0 &&
|
||||
exists("docs/notes.md") && !exists("src/notes.txt"),
|
||||
"move creates parent and renames");
|
||||
reset(&r);
|
||||
wfile("other.txt", "o\n");
|
||||
EXPECT(run(&ctx, mk("move_file", "from", "other.txt", "to", "docs/notes.md",
|
||||
NULL),
|
||||
&r) == 1 &&
|
||||
strstr(r.out, "exists"),
|
||||
"move refuses to overwrite");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("move_file", "from", "other.txt", "to", "../escape.txt",
|
||||
NULL),
|
||||
&r) == 1,
|
||||
"move outside workspace denied");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("delete_file", "path", "other.txt", NULL), &r) == 0 &&
|
||||
!exists("other.txt") && strstr(r.out, "-o"),
|
||||
"delete with diff");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("delete_file", "path", "src", NULL), &r) == 1 &&
|
||||
strstr(r.out, "directory"),
|
||||
"delete refuses directories");
|
||||
reset(&r);
|
||||
|
||||
/* todo_write / ask_user */
|
||||
EXPECT(run(&ctx, mk("todo_write", "todos",
|
||||
"- [x] read code\n[~] write fix\nrun tests\n", NULL),
|
||||
&r) == 0 &&
|
||||
strstr(r.out, "1/3 done"),
|
||||
"todo_write counts");
|
||||
EXPECT(strcmp(g_todo, "[x] read code\n[~] write fix\n[ ] run tests\n") == 0,
|
||||
"todo normalized and handed to the agent");
|
||||
reset(&r);
|
||||
EXPECT(run(&ctx, mk("ask_user", "question", "Proceed?", NULL), &r) == 1 &&
|
||||
strstr(r.out, "no interactive user"),
|
||||
"ask_user headless");
|
||||
reset(&r);
|
||||
ctx.ask = ask_yes;
|
||||
EXPECT(run(&ctx, mk("ask_user", "question", "Proceed?", NULL), &r) == 0 &&
|
||||
strstr(r.out, "yes please"),
|
||||
"ask_user answered");
|
||||
reset(&r);
|
||||
|
||||
/* web_fetch refuses non-http schemes without touching the network */
|
||||
EXPECT(run(&ctx, mk("web_fetch", "url", "file:///etc/passwd", NULL), &r) == 1,
|
||||
"web_fetch rejects file://");
|
||||
reset(&r);
|
||||
|
||||
/* undo targets */
|
||||
{
|
||||
char paths[CST_TOOL_MAX_TARGETS][1024];
|
||||
ctl_tool_call_t c = mk("move_file", "from", "a.txt", "to", "b.txt", NULL);
|
||||
EXPECT(cst_tool_targets(&c, paths, CST_TOOL_MAX_TARGETS) == 2 &&
|
||||
strcmp(paths[0], "a.txt") == 0 && strcmp(paths[1], "b.txt") == 0,
|
||||
"move targets");
|
||||
c = mk("apply_patch", "patch",
|
||||
"--- a/x.c\n+++ b/x.c\n@@ -1 +1 @@\n-a\n+b\n--- /dev/null\n+++ "
|
||||
"b/y.c\n@@ -0,0 +1 @@\n+y\n",
|
||||
NULL);
|
||||
EXPECT(cst_tool_targets(&c, paths, CST_TOOL_MAX_TARGETS) == 2 &&
|
||||
strcmp(paths[0], "x.c") == 0 && strcmp(paths[1], "y.c") == 0,
|
||||
"patch targets");
|
||||
}
|
||||
|
||||
char cmd[400];
|
||||
snprintf(cmd, sizeof(cmd), "rm -rf %s", g_ws);
|
||||
if (system(cmd) != 0)
|
||||
fprintf(stderr, "note: cleanup failed\n");
|
||||
if (nfail) {
|
||||
fprintf(stderr, "test_tools_fs: %d failure(s)\n", nfail);
|
||||
return 1;
|
||||
}
|
||||
printf("test_tools_fs: OK\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
/* Undo snapshots, persistent permission rules and session store helpers. */
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include "cst_agent.h"
|
||||
#include "cst_perms.h"
|
||||
#include "cst_undo.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static int nfail;
|
||||
|
||||
#define EXPECT(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
fprintf(stderr, "FAIL %s:%d: %s\n", __FILE__, __LINE__, msg); \
|
||||
nfail++; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static char g_ws[256];
|
||||
|
||||
static void wfile(const char *rel, const char *s) {
|
||||
char p[512];
|
||||
snprintf(p, sizeof(p), "%s/%s", g_ws, rel);
|
||||
FILE *fp = fopen(p, "wb");
|
||||
if (fp) {
|
||||
fputs(s, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
static int rfile_eq(const char *rel, const char *want) {
|
||||
char p[512], buf[256] = {0};
|
||||
snprintf(p, sizeof(p), "%s/%s", g_ws, rel);
|
||||
FILE *fp = fopen(p, "rb");
|
||||
if (!fp)
|
||||
return want == NULL;
|
||||
size_t n = fread(buf, 1, sizeof(buf) - 1, fp);
|
||||
fclose(fp);
|
||||
buf[n] = 0;
|
||||
return want && strcmp(buf, want) == 0;
|
||||
}
|
||||
|
||||
static void test_undo(void) {
|
||||
const char *sid = "s1";
|
||||
wfile("a.txt", "v1\n");
|
||||
EXPECT(cst_undo_count(g_ws, sid) == 0, "no undo yet");
|
||||
|
||||
/* turn 1: edit a.txt twice, create new.txt */
|
||||
EXPECT(cst_undo_snapshot(g_ws, sid, "t1", "a.txt") == 0, "snap a");
|
||||
wfile("a.txt", "v2\n");
|
||||
EXPECT(cst_undo_snapshot(g_ws, sid, "t1", "a.txt") == 0, "snap a again");
|
||||
wfile("a.txt", "v3\n");
|
||||
EXPECT(cst_undo_snapshot(g_ws, sid, "t1", "new.txt") == 0, "snap absent");
|
||||
wfile("new.txt", "hello\n");
|
||||
EXPECT(cst_undo_count(g_ws, sid) == 1, "one turn");
|
||||
|
||||
/* turn 2: edit a.txt again */
|
||||
EXPECT(cst_undo_snapshot(g_ws, sid, "t2", "a.txt") == 0, "snap t2");
|
||||
wfile("a.txt", "v4\n");
|
||||
EXPECT(cst_undo_count(g_ws, sid) == 2, "two turns");
|
||||
|
||||
char rep[1024];
|
||||
EXPECT(cst_undo_restore_last(g_ws, sid, rep, sizeof(rep)) == 0, "undo t2");
|
||||
EXPECT(rfile_eq("a.txt", "v3\n"), "a back to v3");
|
||||
EXPECT(rfile_eq("new.txt", "hello\n"), "new.txt kept by t2 undo");
|
||||
EXPECT(strstr(rep, "a.txt") != NULL, "report names a.txt");
|
||||
|
||||
EXPECT(cst_undo_restore_last(g_ws, sid, rep, sizeof(rep)) == 0, "undo t1");
|
||||
EXPECT(rfile_eq("a.txt", "v1\n"), "a back to v1 (first snapshot wins)");
|
||||
EXPECT(rfile_eq("new.txt", NULL), "new.txt removed");
|
||||
EXPECT(cst_undo_count(g_ws, sid) == 0, "nothing left");
|
||||
EXPECT(cst_undo_restore_last(g_ws, sid, rep, sizeof(rep)) != 0,
|
||||
"undo with nothing fails");
|
||||
|
||||
/* subdirectory file that did not exist, parent dirs created later */
|
||||
EXPECT(cst_undo_snapshot(g_ws, sid, "t3", "d/e/f.txt") == 0, "snap nested");
|
||||
char p[512];
|
||||
snprintf(p, sizeof(p), "%s/d", g_ws);
|
||||
mkdir(p, 0755);
|
||||
snprintf(p, sizeof(p), "%s/d/e", g_ws);
|
||||
mkdir(p, 0755);
|
||||
wfile("d/e/f.txt", "x");
|
||||
EXPECT(cst_undo_restore_last(g_ws, sid, rep, sizeof(rep)) == 0, "undo t3");
|
||||
EXPECT(rfile_eq("d/e/f.txt", NULL), "nested file removed");
|
||||
|
||||
/* escaping paths are refused */
|
||||
EXPECT(cst_undo_snapshot(g_ws, sid, "t4", "../evil") != 0, "reject ..");
|
||||
EXPECT(cst_undo_snapshot(g_ws, sid, "t4", "/etc/passwd") != 0,
|
||||
"reject absolute");
|
||||
}
|
||||
|
||||
static void test_perms(void) {
|
||||
cst_perms_t *p = cst_perms_open(g_ws);
|
||||
EXPECT(p != NULL, "open perms");
|
||||
EXPECT(!cst_perms_tool_allowed(p, "write_file"), "empty rules");
|
||||
EXPECT(cst_perms_allow_tool(p, "write_file") == 0, "allow tool");
|
||||
EXPECT(cst_perms_allow_prefix(p, "git status") == 0, "allow prefix");
|
||||
cst_perms_close(p);
|
||||
|
||||
p = cst_perms_open(g_ws);
|
||||
EXPECT(cst_perms_tool_allowed(p, "write_file"), "tool rule persisted");
|
||||
EXPECT(!cst_perms_tool_allowed(p, "delete_file"), "other tool not allowed");
|
||||
EXPECT(cst_perms_shell_allowed(p, "git status"), "exact prefix");
|
||||
EXPECT(cst_perms_shell_allowed(p, "git status -s"), "prefix + args");
|
||||
EXPECT(!cst_perms_shell_allowed(p, "git statusx"), "word boundary");
|
||||
EXPECT(!cst_perms_shell_allowed(p, "git status; rm -rf ~"), "meta ;");
|
||||
EXPECT(!cst_perms_shell_allowed(p, "git status && make"), "meta &&");
|
||||
EXPECT(!cst_perms_shell_allowed(p, "git status $(id)"), "meta $(");
|
||||
EXPECT(!cst_perms_shell_allowed(p, "git status > x"), "meta >");
|
||||
EXPECT(!cst_perms_shell_allowed(p, "git status\nrm x"), "newline");
|
||||
char *d = cst_perms_describe(p);
|
||||
EXPECT(d && strstr(d, "git status") && strstr(d, "write_file"), "describe");
|
||||
free(d);
|
||||
EXPECT(cst_perms_reset(p) == 0, "reset");
|
||||
EXPECT(!cst_perms_tool_allowed(p, "write_file"), "reset clears tools");
|
||||
EXPECT(!cst_perms_shell_allowed(p, "git status"), "reset clears prefixes");
|
||||
cst_perms_close(p);
|
||||
|
||||
char out[128];
|
||||
cst_perms_suggest_prefix("git commit -m 'x'", out, sizeof(out));
|
||||
EXPECT(strcmp(out, "git commit") == 0, "git two words");
|
||||
cst_perms_suggest_prefix(" ls -la src", out, sizeof(out));
|
||||
EXPECT(strcmp(out, "ls") == 0, "ls one word");
|
||||
cst_perms_suggest_prefix("make -j8", out, sizeof(out));
|
||||
EXPECT(strcmp(out, "make") == 0, "make");
|
||||
cst_perms_suggest_prefix("rm -rf build", out, sizeof(out));
|
||||
EXPECT(out[0] == 0, "no rule for rm");
|
||||
cst_perms_suggest_prefix("sudo make install", out, sizeof(out));
|
||||
EXPECT(out[0] == 0, "no rule for sudo");
|
||||
cst_perms_suggest_prefix("python3 -c 'print(1)'", out, sizeof(out));
|
||||
EXPECT(out[0] == 0, "no rule for python3 -c");
|
||||
cst_perms_suggest_prefix("python3 -m pytest", out, sizeof(out));
|
||||
EXPECT(out[0] == 0, "no rule for python3 -m");
|
||||
cst_perms_suggest_prefix("npm test", out, sizeof(out));
|
||||
EXPECT(strcmp(out, "npm test") == 0, "npm test");
|
||||
}
|
||||
|
||||
static void test_store(void) {
|
||||
EXPECT(cst_agent_store_ensure(g_ws) == 0, "store ensure");
|
||||
char path[1024];
|
||||
EXPECT(cst_agent_store_path_for_id(g_ws, "20260101-000000-abcd", path,
|
||||
sizeof(path)) == 0,
|
||||
"path for id");
|
||||
FILE *fp = fopen(path, "w");
|
||||
EXPECT(fp != NULL, "create session file");
|
||||
if (fp) {
|
||||
fputs("{\"role\":\"system\",\"content\":\"sys\"}\n", fp);
|
||||
fputs("{\"role\":\"user\",\"content\":\"fix the\\nbuild\"}\n", fp);
|
||||
fputs("{\"role\":\"assistant\",\"content\":\"ok\"}\n", fp);
|
||||
fclose(fp);
|
||||
}
|
||||
cst_agent_store_set_current(g_ws, "20260101-000000-abcd");
|
||||
cst_session_info_t in;
|
||||
EXPECT(cst_agent_store_info(g_ws, "20260101-000000-abcd", &in) == 0, "info");
|
||||
EXPECT(in.messages == 3, "message count");
|
||||
EXPECT(strcmp(in.first_user, "fix the build") == 0, "first user line");
|
||||
EXPECT(in.title[0] == 0, "no title yet");
|
||||
EXPECT(cst_agent_store_title_set(g_ws, "20260101-000000-abcd", "Build fix") ==
|
||||
0,
|
||||
"set title");
|
||||
cst_agent_store_info(g_ws, "20260101-000000-abcd", &in);
|
||||
EXPECT(strcmp(in.title, "Build fix") == 0, "title read back");
|
||||
EXPECT(cst_agent_store_title_set(g_ws, "../x", "bad") != 0, "bad id");
|
||||
EXPECT(cst_agent_store_delete(g_ws, "20260101-000000-abcd") == 0, "delete");
|
||||
EXPECT(access(path, F_OK) != 0, "session file gone");
|
||||
char cur[128];
|
||||
EXPECT(cst_agent_store_get_current(g_ws, cur, sizeof(cur)) != 0,
|
||||
"CURRENT cleared");
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
snprintf(g_ws, sizeof(g_ws), "/tmp/cst_test_undo_XXXXXX");
|
||||
if (!mkdtemp(g_ws)) {
|
||||
perror("mkdtemp");
|
||||
return 1;
|
||||
}
|
||||
test_undo();
|
||||
test_perms();
|
||||
test_store();
|
||||
char cmd[512];
|
||||
snprintf(cmd, sizeof(cmd), "rm -rf '%s'", g_ws);
|
||||
if (system(cmd) != 0)
|
||||
fprintf(stderr, "warning: cleanup failed\n");
|
||||
if (nfail) {
|
||||
fprintf(stderr, "test_undo: %d failure(s)\n", nfail);
|
||||
return 1;
|
||||
}
|
||||
printf("test_undo: ok\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user