-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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] 接入openai兼容代理,获取模型列表报错 #5338
Comments
👀 @CoolGIS Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
@CoolGIS 你好,我是Dosu,一个可以帮助你解决问题、回答疑问并成为贡献者的机器人。我在这里可以帮助你,等待人类维护者的到来。 The error message In version 1.44.1, a fix was made for the "model select not auto update and sort issue," which might have affected how model lists are retrieved and stored [1]. Additionally, version 1.44.0 introduced a "Brand new AI provider" feature, which could have changed the way models are handled or stored, potentially leading to this error if the new data exceeds the character limit [1]. To resolve this issue, you might need to check the database schema to ensure that the field in question can accommodate the data being stored. Alternatively, you could look into the code handling the model list retrieval to see if there are any constraints or transformations applied to the data before it is stored in the database. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
The error message "value too long for type character varying(10)" suggests that there is an attempt to store a string longer than 10 characters in a database column that is defined to hold a maximum of 10 characters. This issue likely arises when the system tries to store data from the API response into the database. Here are a few steps you can take to troubleshoot and potentially resolve this issue:
By following these steps, you should be able to identify the root cause of the error and implement a solution. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
|
|
遇到了一样的问题 |
Encountered the same problem |
的确是服务器提供的字段不标准导致的。故意设成 接下来会在目前的实现做一层兼容,支持标准的timestamp/date字符串/unix时间戳,应该能满足99%的场景了,如果这样兼容后还出错的话,应该让服务商自己去改造来支持标准规范。 |
It is indeed caused by the non-standard fields provided by the server. It is deliberately set to varchar 10 to avoid irregular date situations. Next, we will make a layer of compatibility in the current implementation to support standard timestamp/date string/unix timestamp, which should be able to meet 99% of scenarios. If errors still occur after such compatibility, the service provider should modify it by themselves. Support standard specifications. |
感谢回复,我了解兼容层这个概念,但是不知道有没有正确理解您说的兼容层的作用,如果接口返回的是空字符串,或者类似null,"Invalid Date"这种不规范date值,会被拒绝入库吗?还是在兼容层做一次处理,类似直接将不能正确解析为date的值替换为一个默认的时间戳再入库之类的? |
Thanks for the reply. I understand the concept of the compatibility layer, but I don’t know if I correctly understand the role of the compatibility layer you mentioned. If the interface returns an empty string, or a non-standard date value such as null or "Invalid Date", it will Rejected for storage? Or should we do a process in the compatibility layer, such as directly replacing the value that cannot be correctly parsed as date with a default timestamp and then entering it into the database? |
如果是空串或者null这种,会作为无效值,直接当成未定义处理,即入库的时候就没有 releasedAt 字段,展示的时候也不会显示 |
If it is an empty string or null, it will be treated as an invalid value and directly treated as undefined. That is, there will be no releasedAt field when it is stored in the library, and it will not be displayed when displayed. |
📦 Environment
Vercel
📌 Version
1.44.1
💻 Operating System
Windows
🌐 Browser
Chrome
🐛 Bug Description
value too long for type character varying(10)
value too long for type character varying(10)
https://example.com/trpc/lambda/aiModel.batchUpdateAiModels?batch=1
cURL.txt
📷 Recurrence Steps
value too long for type character varying(10)
🚦 Expected Behavior
成功获取模型列表
📝 Additional Information
No response
The text was updated successfully, but these errors were encountered: