feat(llm): LLMResult.tool_calls from OpenAI-shaped responses
Parse choices[0].message.tool_calls into the ask Result; empty list when absent. Offline gold covers tool_calls_from. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
46d78c6e15
commit
2d412e3bba
7 files changed
+83
-16
No files matched your search
@@ -70,6 +70,7 @@ import llm:ext/ai/llm.mq.md
|
||||
| `tokens` | Alias of `usage.total_tokens` (agent metrics) |
|
||||
| `name` | Optional handle tag (`fast` / `reasoning`) |
|
||||
| `llm_calls` | `1` per ask |
|
||||
| `tool_calls` | List of OpenAI-shaped tool call objects (empty when none) |
|
||||
|
||||
### Compat
|
||||
|
||||
@@ -102,4 +103,6 @@ Fallbacks: `MARQDO_LLM_API_KEY`, `MARQDO_LLM_BASE_URL`, `MARQDO_LLM_MODEL`. Ctor
|
||||
- `tests/ext/llm-ask-offline.mq.md` (create + collect)
|
||||
- `tests/ext/llm-stream-offline.mq.md`
|
||||
- `tests/ext/llm-named-offline.mq.md` (fast/reasoning + prompt_load)
|
||||
- `tests/ext/llm-tool-calls-offline.mq.md` (`tool_calls_from` / Result field)
|
||||
- `tests/ext/llm-meta-offline.mq.md` · `llm-entry-prompt-offline.mq.md`
|
||||
- Live: `llm-complete.mq.md` · `llm-stream-live.mq.md`
|
||||
@@ -33,7 +33,7 @@
|
||||
| Named models(`llm.fast` / `llm.reasoning`) | **done** |
|
||||
| Prompt document:`prompt` / `prompt_load` + `type: prompt` 正文 | **done**(无参 `ask`/`stream` → `sys.module_source` + `prompt_body`) |
|
||||
| 拆 `ext/ai/llm/openai.mq.md` + `ollama` 后端 | **done** |
|
||||
| tool_calls 完整 Result | 暂缓 |
|
||||
| tool_calls 完整 Result | **done**(`openai.tool_calls_from` + `LLMResult.tool_calls`;`llm-tool-calls-offline`) |
|
||||
| Transport → 可选 ABI 插件 | 暂缓 |
|
||||
| Artifact Metadata Binding(`${env.*}` / `secret` · `sys.meta`) | **done**(Phase 1 Metadata-only + Phase 2 scope lift;[binding.md](../design/binding.md)) |
|
||||
|
||||
@@ -73,5 +73,5 @@
|
||||
## 6. 验收金样
|
||||
|
||||
- Agent:`tests/ext/agent-v2-learn.mq.md` · `agent-p4-route.mq.md` · `agent-zero-llm.mq.md` · `agent-plan-preserve.mq.md` · `scripts/agent-harness.sh`
|
||||
- LLM:`tests/ext/llm-ask-offline.mq.md` · `llm-stream-offline.mq.md` · `llm-ctor-offline.mq.md` · `llm-named-offline.mq.md` · `llm-meta-offline.mq.md` · `llm-entry-prompt-offline.mq.md`
|
||||
- LLM:`tests/ext/llm-ask-offline.mq.md` · `llm-stream-offline.mq.md` · `llm-ctor-offline.mq.md` · `llm-named-offline.mq.md` · `llm-meta-offline.mq.md` · `llm-entry-prompt-offline.mq.md` · `llm-tool-calls-offline.mq.md`
|
||||
- Binding:`tests/structure/meta-binding.mq.md` · `meta-lift.mq.md`
|
||||
Reference in new issue
Block a user