- CHANGELOG.md:v2.8.0 条目(中英双语); - README.md:版本行 2.7.1→2.8.0 + 愿景第 6 条(知识可证明); - doc/releases/v2.8.0.md:双语发版说明(亮点/用法/已知限制); - skills/marqdo-dev/index.mq.md:新增 prove 任务(路径/目录模式/ require_lean/json;参数用 + 行声明升参,check 与 narrative-ratio 通过); - 设计文档 §12.5 标记已合入;发版链接统一指向 doc/releases/v2.8.0.md。
2.6 KiB
Executable File
2.6 KiB
Executable File
markup, title, description, import
| markup | title | description | import | ||||
|---|---|---|---|---|---|---|---|
| occlusion | ext/ai/llm/ollama | Ollama backend defaults. Transport reuses openai-compatible /v1 chat completions. |
|
resolve
| 参数 | 类型 | 默认 | 说明 |
|---|---|---|---|
| model | any | None | Model resource or provider model identifier, as required by this operation |
| base_url | any | None | Provider API base URL |
| api_key | any | None | Provider credential from trusted runtime configuration |
| 返回 | 类型 | 说明 |
|---|---|---|
| result | any | Resolve Ollama handle fields: default host http://127.0.0.1:11434/v1, key ollama, model llama3.2. |
Use model=None, base_url=None, api_key=None as the inputs for this operation.
Resolve Ollama handle fields: default host http://127.0.0.1:11434/v1, key ollama, model llama3.2.
api_keyWe retain key = api_key.-
We retain key = "ollama".
base_urlWe retain url = base_url.-
We retain url = Env get.
- not
urlWe retain url = "http://127.0.0.1:11434/v1". -
**_ = 1**
modelWe retain mdl = model.-
We retain mdl = Env get.
- not
mdlWe retain mdl = "llama3.2". -
**_ = 1**
cfg =
| backend | api_key | base_url | model |
|---|---|---|---|
| ollama | key |
url |
mdl |
Return cfg.
chat_completions
| 参数 | 类型 | 默认 | 说明 |
|---|---|---|---|
| base_url | any | required | Provider API base URL |
| api_key | any | required | Provider credential from trusted runtime configuration |
| model | any | required | Model resource or provider model identifier, as required by this operation |
| prompt | any | required | Prompt text or structured prompt expected by this adapter |
| stream | any | False | Whether to preserve streaming behavior or emit stream events |
| echo | any | False | Whether to print the documented incremental output |
| 返回 | 类型 | 说明 |
|---|---|---|
| result | any | Send the prepared chat request through this provider adapter and retain its usage, stream and failure conventions. |
Use base_url, api_key, model, prompt, stream=False, echo=False as the inputs for this operation.
Send the prepared chat request through this provider adapter and retain its usage, stream and failure conventions.
Return [Chat completions](openai.chat_completions(base_url=base_url, api_key=api_key, model=model, prompt=prompt, stream=stream, echo=echo)).