Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lua/gp/dispatcher.lua
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,12 @@ local query = function(buf, provider, payload, handler, on_exit, callback)
end

if qt.provider == "googleai" then
if line:match('"text":') then
content = vim.json.decode("{" .. line .. "}").text
end
if line:match('"text":') then
local status, result = pcall(vim.json.decode, "{" .. line .. "}")
if status and result and result.text then
content = result.text
end
end
end

if qt.provider == "ollama" then
Expand Down