# Discourse AI Gemini Embeddings 无法启用，但其他功能正常

**URL:** https://meta.discourse.org/t/discourse-ai-gemini-embeddings-failing-to-enable-but-other-features-work-fine/334872
**Category:** Support
**Tags:** ai
**Created:** [2024年十一月7日 02:05 UTC](https://meta.discourse.org/t/discourse-ai-gemini-embeddings-failing-to-enable-but-other-features-work-fine/334872 "2024-11-07T02:05:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![joo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joo/32/334852_2.png) [@joo](https://meta.discourse.org/u/joo)
#### Post date: [2024年十一月7日 02:05 UTC](https://meta.discourse.org/t/discourse-ai-gemini-embeddings-failing-to-enable-but-other-features-work-fine/334872/1 "2024-11-07T02:05:05Z")

</div>

![The image is a screenshot of a dark window with white text indicating the status of image captioning tasks, with one task enabled and one error occurring. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/7/8/8/7882788f834ae30b9316f4e8bca47d87377239a3.png)

我在 Discourse AI 中启用“启用嵌入模块”功能时遇到问题。启用后，Discourse 会报错，日志显示如下：

```plaintext
Message (multiple occurrences)

Google Gemini Embeddings failed with status: 400 body: {
  "error": {
    "code": 400,
    "message": "API key expired. Please renew the API key.", // 此错误在续订 API 密钥后仍然存在
    "status": "INVALID_ARGUMENT",
    ... (rest of the error message)
  }
}

```

我已经更新了我的 Gemini API 密钥，但问题仍然存在。奇怪的是，其他 Discourse AI 功能，例如“启用主题摘要模块”和“启用 AI 助手”，都可以正常工作。

我正在运行最新版本的 Discourse 和 Discourse AI 插件。

是否有人遇到过此问题？我是否遗漏了某个配置步骤？

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2024年十一月7日 17:34 UTC](https://meta.discourse.org/t/discourse-ai-gemini-embeddings-failing-to-enable-but-other-features-work-fine/334872/4 "2024-11-07T17:34:52Z")

</div>

我们不小心隐藏了 Gemini API 密钥站点设置，[我已经将其重新显示](https://github.com/discourse/discourse-ai/pull/902)。请更新到最新版本并在设置中填写新的 API。

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2024年十二月7日 19:59 UTC](https://meta.discourse.org/t/discourse-ai-gemini-embeddings-failing-to-enable-but-other-features-work-fine/334872/6 "2024-12-07T19:59:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
