ECA sends null JSON items to Mistral models

未关闭
#685 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
json
领域
api

调研方向

Start from the reproduction in eca-emacs/Eask: run ECA in Emacs, select mistral-small, and send “what is the package version?”. Inspect the JSON input sent with the prompt and compare it with the attached examples; the issue is done when ECA sends valid input without null items and the prompt succeeds.

由索引模型根据 Issue 内容生成。

描述

bug

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

Describe the bug

When I send prompts in an Emacs ECA session to a Mistral model, I get the error OpenAI response status: 400 body: {"object":"error","message":"input: Value error, Input items of type None are not supported.","type":"invalid_request_error","param":null,"code":"3051","raw_status_code":400}.

This is because ECA sends null items in its JSON input (see the attached files for examples; I replaced some ids there with ... to avoid posting possibly sensitive information). It happens at least with mistral-small (when sending the first prompt already) and mistral-large-4 (when sending a followup prompt in the same session) models.

eca-mistral-small.json
eca-mistral-large-4.json

To Reproduce

Steps to reproduce the behavior:

  1. Run Emacs.
  2. Open let's say eca-emacs/Eask file and run `M-x eca' there.
  3. Select mistral-small model.
  4. Run prompt "what is the package version?".
  5. You should get the error.

Expected behavior

ECA sends valid JSON inputs.

Doctor

Paste the relevant parts of /doctor command from chat if applicable:

ECA version: 0.169.0

Server cmd: /home/pdm/.emacs.d/eca/eca server

Workspaces: /home/pdm/git/github.com/editor-code-assistant/eca-emacs

Default model: mistral/mistral-large-4 (API key (...))

Logged providers:
mistral: API key (...)

Relevant env vars:

Credential files: None found

主要语言
Clojure
星标
1k
派生
82
平均合并
1 天 21 小时
30 天内合并 PR
25

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

editor-code-assistant/eca 的其他 Issue

查看 editor-code-assistant/eca 的全部 Issue

相似的 Issue

更多 Clojure Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。