Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 勾选 支持视觉识别时 报错服务器不明白您的请求 #5343

Open
jiajiaxd opened this issue Jan 8, 2025 · 5 comments
Open
Labels
🐛 Bug Something isn't working | 缺陷 vision

Comments

@jiajiaxd
Copy link

jiajiaxd commented Jan 8, 2025

📦 Environment

Docker

📌 Version

v1.44.2

💻 Operating System

Windows

🌐 Browser

Chrome

🐛 Bug Description

由于更新了新的Ai provider界面后,github提供商不可用,所以我尝试添加了一个自定义提供商,并添加了o1模型。但是如果勾选视觉识别,提示服务器不明白您的请求并失败。
image

image

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

@jiajiaxd jiajiaxd added the 🐛 Bug Something isn't working | 缺陷 label Jan 8, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Jan 8, 2025
@lobehubbot
Copy link
Member

👀 @jiajiaxd

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@dosubot dosubot bot added the vision label Jan 8, 2025
Copy link

dosubot bot commented Jan 8, 2025

The issue you're encountering with the "invalid_type" error when enabling vision recognition in a custom provider configuration might be related to how the vision capability is being handled in the codebase. Here are a few things to check:

  1. Model Configuration: Ensure that the model you are using supports vision recognition. The isModelEnabledVision function in the codebase checks if a model has vision capabilities. Make sure your custom model is correctly configured to support this feature [1].

  2. Error Handling: The error handling mechanism for custom provider configurations involves specific error types based on API responses. The "invalid_type" error might indicate a mismatch in expected input types or configurations. Review the error handling logic to ensure that the custom provider is correctly set up to handle vision tasks [2][3].

  3. Docker Configuration: Verify that your Docker environment is correctly configured to support the vision recognition feature. Although specific requirements for Docker weren't found, ensuring that all necessary dependencies and configurations are in place is crucial.

If these steps don't resolve the issue, consider reviewing the custom provider's API documentation to ensure compatibility with vision recognition tasks.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@arvinxx
Copy link
Contributor

arvinxx commented Jan 9, 2025

报错的详细信息发出来下

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Send the details of the error report.

@jiajiaxd
Copy link
Author

jiajiaxd commented Jan 9, 2025

报错的详细信息发出来下
@arvinxx

{"level":30,"time":1736417484662,"pid":28,"hostname":"e8c627ca5112","msg":"Error in tRPC handler (lambda) on path: aiModel.updateAiModel, type: mutation"}
Error [TRPCError]: [
  {
    "code": "invalid_type",
    "expected": "number",
    "received": "null",
    "path": [
      "value",
      "contextWindowTokens"
    ],
    "message": "Expected number, received null"
  }
]
    at r (.next/server/chunks/12620.js:1:3847)
    at async f (.next/server/chunks/12620.js:4:68)
    at async f (.next/server/chunks/12620.js:4:68)
    at async f (.next/server/chunks/12620.js:4:68)
    at async r (.next/server/chunks/12620.js:1:5799)
    at async (.next/server/chunks/98787.js:1:7774)
    at async g (.next/server/chunks/98787.js:1:10660)
    at async r (.next/server/chunks/22699.js:1:428) {
  code: 'BAD_REQUEST',
  [cause]: Error [ZodError]: [
    {
      "code": "invalid_type",
      "expected": "number",
      "received": "null",
      "path": [
        "value",
        "contextWindowTokens"
      ],
      "message": "Expected number, received null"
    }
  ]
      at get error (.next/server/chunks/54482.js:1:10506)
      at es.parseAsync (.next/server/chunks/54482.js:1:12782)
      at async r (.next/server/chunks/12620.js:1:3821)
      at async f (.next/server/chunks/12620.js:4:68)
      at async f (.next/server/chunks/12620.js:4:68)
      at async f (.next/server/chunks/12620.js:4:68)
      at async r (.next/server/chunks/12620.js:1:5799)
      at async (.next/server/chunks/98787.js:1:7774)
      at async g (.next/server/chunks/98787.js:1:10660)
      at async r (.next/server/chunks/22699.js:1:428) {
    issues: [ [Object] ],
    addIssue: [Function (anonymous)],
    addIssues: [Function (anonymous)]
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 vision
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

3 participants