We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0828d32 commit 89a86f0Copy full SHA for 89a86f0
lua/avante/config.lua
@@ -64,7 +64,7 @@ M._defaults = {
64
},
65
---@type WebSearchEngineProviderResponseBodyFormatter
66
format_response_body = function(body)
67
- if body.answer_box ~= nil then return body.answer_box.result, nil end
+ if body.answer_box ~= nil and body.answer_box.result ~= nil then return body.answer_box.result, nil end
68
if body.organic_results ~= nil then
69
local jsn = vim
70
.iter(body.organic_results)
lua/avante/llm_tools/init.lua
@@ -326,6 +326,7 @@ function M.web_search(opts, on_log)
326
local jsn = vim.json.decode(resp.body)
327
return search_engine.format_response_body(jsn)
328
end
329
+ return nil, "Error: No search engine found"
330
331
332
---@type AvanteLLMToolFunc<{ url: string }>
0 commit comments