[Bug] 调用google搜索异常
sparkssssssssss opened this issue · comments
Bug Description
重新开一个对话,就正常的.所以感觉是触发了什么bug
对话框内返回,部署在海外vps网络应该不是问题
{
"error": true,
"message": "[object Object]"
}
错误日志
[handleChainError] s [Error]: Failed to parse tool arguments from chat model response. Text: "[{"id":"call_3WGii4SpdT1NgUgvGIifPsCV","type":"function","function":{"name":"google_custom_search","parameters":{"type":"","properties":null,"required":null}}},{"type":"","function":{"name":"","parameters":{"type":"","properties":null,"required":null},"arguments":"{"}},{"type":"","function":{"name":"","parameters":{"type":"","properties":null,"required":null},"arguments":" \""}},{"type":"","function":{"name":"","parameters":{"type":"","properties":null,"required":null},"arguments":"input"}},{"type":"","function":{"name":"","parameters":{"type":"","properties":null,"required":null},"arguments":"\":"}},{"type":"","function":{"name":"","parameters":{"type":"","properties":null,"required":null},"arguments":" \""}},{"type":"","function":{"name":"","parameters":{"type":"","properties":null,"required":null},"arguments":"June"}},{"type":"","function":{"name":"","parameters":{"type":"","properties":null,"required":null},"arguments":" "}},{"type":"","function":{"name":"","parameters":{"type":"","properties":null,"required":null},"arguments":"1"}},{"type":"","function":{"name":"","parameters":{"type":"","properties":null,"required":null},"arguments":" holidays"}},{"type":"","function":{"name":"","parameters":{"type":"","properties":null,"required":null},"arguments":"\""}},{"type":"","function":{"name":"","parameters":{"type":"","properties":null,"required":null},"arguments":" }"}}]". SyntaxError: Unexpected end of JSON input
at eT.parseAIMessage (/app/.next/server/app/api/langchain/tool/agent/nodejs/route.js:3:57)
at eT.parseResult (/app/.next/server/app/api/langchain/tool/agent/nodejs/route.js:2:99)
at e._callWithConfig (/app/.next/server/chunks/4598.js:52:20901)
at eT._callWithConfig (/app/.next/server/chunks/4598.js:52:40256)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async eT._streamIterator (/app/.next/server/chunks/4598.js:52:39455)
at async eT.transform (/app/.next/server/chunks/4598.js:52:42074)
at async L._streamIterator (/app/.next/server/chunks/4598.js:55:9141) {
llmOutput: undefined,
observation: undefined,
sendToLLM: false
} writer error
Steps to Reproduce
不知道如何复现,
Expected Behavior
正常返回搜索内容
Screenshots
No response
Deployment Method
- [] Docker
Desktop OS
No response
Desktop Browser
No response
Desktop Browser Version
No response
Smartphone Device
No response
Smartphone OS
No response
Smartphone Browser
No response
Smartphone Browser Version
No response
Additional Logs
No response
Bot detected the issue body's language is not English, translate it automatically.
Title: [Bug] Exception when calling google search
看起来像是模型的入参有问题,所有支持 function call 的模型都这样么?
Bot detected the issue body's language is not English, translate it automatically.
It seems like there is a problem with the input parameters of the model. Is this true for all models that support function call?
看起来像是模型的入参有问题,所有支持 function call 的模型都这样么?
我目前用的2个中转api,长期使用似乎都正常,不过我也不无法确定上游是否会混杂一些不支持function call 的模型,如果是这样的话,那我在观察下
如果可能,希望作者能加入友好的提醒,直接返回模型不支持,感谢
Bot detected the issue body's language is not English, translate it automatically.
It seems like there is a problem with the input parameters of the model. Is this true for all models that support function call?
The two transfer APIs I currently use seem to be normal for long-term use. However, I am not sure whether the upstream will mix some models that do not support function call. If so, I will observe it.
If possible, I hope the author can add a friendly reminder that returning the model directly is not supported. Thank you.
看起来像是模型的入参有问题,所有支持 function call 的模型都这样么?
我目前用的2个中转api,长期使用似乎都正常,不过我也不无法确定上游是否会混杂一些不支持function call 的模型,如果是这样的话,那我在观察下 如果可能,希望作者能加入友好的提醒,直接返回模型不支持,感谢
我想办法处理一下
Bot detected the issue body's language is not English, translate it automatically.
It seems like there is a problem with the input parameters of the model. Is this true for all models that support function call?
The two transfer APIs I currently use seem to be normal after long-term use. However, I am not sure whether the upstream will be mixed with some models that do not support function call. If so, then I will observe it and if possible, I hope the author can Add a friendly reminder, returning the model directly is not supported, thank you
I'll find a way to deal with it
Are you using azure?
请问下,这个也是因为不支持funciton call吗,之前正常的api,这两天一个都不行了,我也不知道是否是上游的问题.
{
"error": true,
"message": "400 Invalid schema for function 'google_custom_search': None is not of type 'array'. (request id: 20240609202145290032819xszwXVuX) (request id: 20240609202145288807174eiLv7eVB) (request id: 20240609202145211999335zxfrT6Wd) (request id: 202406092021445731433360EXS9eLF) (request id: 2024060920214426475172543682865)"
}
这个看起来是中转服务处理参数相关的问题,比如之前就遇到过 one-api 转发的 azure 服务时部分模型无法正常使用 function call。
Bot detected the issue body's language is not English, translate it automatically.
This seems to be a problem related to the processing parameters of the transfer service. For example, I have encountered that some models cannot use function calls normally when using the Azure service forwarded by one-api.
如果想稳定一些,也可以使用 openrouter 和 azure 之类的服务,第三方的中转服务有时候会有一些莫名其妙的问题。
Bot detected the issue body's language is not English, translate it automatically.
If you want to be more stable, you can also use services such as openrouter and azure. Third-party transit services sometimes have some inexplicable problems.
如果想稳定一些,也可以使用 openrouter 和 azure 之类的服务,第三方的中转服务有时候会有一些莫名其妙的问题。
好的,了解了,谢谢
Bot detected the issue body's language is not English, translate it automatically.
If you want to be more stable, you can also use services such as openrouter and azure. Third-party transfer services sometimes have some inexplicable problems.
Okay, I understand, thank you