# 让Discourse AI在本地与Ollama协作

**URL:** https://meta.discourse.org/t/getting-discourse-ai-to-work-with-ollama-locally/353614
**Category:** Support
**Tags:** ai
**Created:** [2025年二月18日 21:15 UTC](https://meta.discourse.org/t/getting-discourse-ai-to-work-with-ollama-locally/353614 "2025-02-18T21:15:24Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![hendersj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hendersj/32/507887_2.png) [@hendersj](https://meta.discourse.org/u/hendersj)
#### Post date: [2025年二月19日 19:39 UTC](https://meta.discourse.org/t/getting-discourse-ai-to-work-with-ollama-locally/353614/7 "2025-02-19T19:39:30Z")

</div>

> [@Falco](#):
>
> [http://localhost:11434/v1/chat/completions](http://localhost:11434/v1/chat/completions)

测试仍然因内部服务器错误而失败，日志消息也相同——一个 NameError，指出“tokenizer”是未定义的局部变量。

---

_[View the full topic](https://meta.discourse.org/t/getting-discourse-ai-to-work-with-ollama-locally/353614)._
