aide icon indicating copy to clipboard operation
aide copied to clipboard

No tools_call in message 这个报错是为什么?

Open HBlihaoyu opened this issue 1 year ago • 3 comments

使用的ollama本地部署方式,模型:llama3.1:8b

No tools_call in message [{"message":{"lc":1,"type":"constructor","id":["langchain_core","messages","AIMessage"],"kwargs":{"content":"Based on the provided npm ls command output, I've identified the dependencies of the current file (visa-h5/src/components/address.vue) and retrieved the required information. Here it is:\n\nDependency file path:\n\nNo specific dependency file was mentioned in the output. However, based on the package names, we can assume that the relevant dependency might be from one of the following packages:\n\n@/common/base.vue (from \"base-vue\")\n@/common/config.js (from \"config-vue\")\n@/common/dataService.js (from \"dataService-js\")\n\nPlease note that I had to infer the package names based on their dependencies, as they are not explicitly mentioned in the output.\n\nThree most useful file paths:\n\nBased on the output and my analysis above, here are three potential file paths that might be relevant:\n\n1. visa-h5/src/components/address.vue (current file) - This is the file you're currently editing.\n2. visa-h5/src/common/base.vue - Assuming this package has dependencies related to addressing or layout management in a Vue environment.\n3. visa-h5/src/views/overCard/order/orderDetail.vue - A potentially relevant component file from another part of the app.\n\nLet me know if you have any questions or if there's anything else I can help with!","tool_calls":[],"invalid_tool_calls":[],"additional_kwargs":{},"response_metadata":{"tokenUsage":{"completionTokens":280,"promptTokens":1026,"totalTokens":1306},"finish_reason":"stop","system_fingerprint":"fp_ollama"},"id":"chatcmpl-240"}},"text":"Based on the provided npm ls command output, I've identified the dependencies of the current file (visa-h5/src/components/address.vue) and retrieved the required information. Here it is:\n\nDependency file path:\n\nNo specific dependency file was mentioned in the output. However, based on the package names, we can assume that the relevant dependency might be from one of the following packages:\n\n@/common/base.vue (from \"base-vue\")\n@/common/config.js (from \"config-vue\")\n@/common/dataService.js (from \"dataService-js\")\n\nPlease note that I had to infer the package names based on their dependencies, as they are not explicitly mentioned in the output.\n\nThree most useful file paths:\n\nBased on the output and my analysis above, here are three potential file paths that might be relevant:\n\n1. visa-h5/src/components/address.vue (current file) - This is the file you're currently editing.\n2. visa-h5/src/common/base.vue - Assuming this package has dependencies related to addressing or layout management in a Vue environment.\n3. visa-h5/src/views/overCard/order/orderDetail.vue - A potentially relevant component file from another part of the app.\n\nLet me know if you have any questions or if there's anything else I can help with!"}]

HBlihaoyu avatar Aug 08 '24 15:08 HBlihaoyu

某些功能依赖于模型的 function_call 能力,假如模型没有这个能力则会报此错误,建议更换具有 function_call 能力的模型,比如 OpenAI 的 gpt-4o 或者国产 deepseek 的模型

2214962083 avatar Aug 08 '24 15:08 2214962083

按照您的推荐,我使用了deepseek的模型,然后报了另一个错误

image

422 Failed to deserialize the JSON body into the target type: messages[0]: invalid type: sequence, expected a string at line 24 column 3

HBlihaoyu avatar Aug 09 '24 03:08 HBlihaoyu

你是否在使用智能粘贴图转代码,这个功能目前很多国产模型都不支持,这个功能我只推荐open AI的gpt-4o,如果你很想用但又很难获取openAI key,你可以看一下这里:https://aide.nicepkg.cn/zh/guide/use-another-llm/aide-models

目前没有库存,可能今天晚上才能补充库存

2214962083 avatar Aug 09 '24 03:08 2214962083