curl parameters size limit
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- lua
- Domain
- networking
Research direction
Start at the plenary.curl entry point used by curl.post and reproduce the error with progressively larger request bodies. Trace where the "value too large" error originates, then document the effective limit or identify the change needed to support larger bodies.
Written by the indexing model from the issue text.
Description
Hello,
With the below code, If the body is very big, I get a "value too large" error.
After having put logging everywhere, I found that the error is thrown at the curl.post line, when the body is past to plenary.curl.
I think that there is a size limit for the body, but I don't know how where is that limit set.
What is exactly the limit?
local curl = require('plenary.curl')
local query = {}
function query.askCallback(res, opts)
-- Process res and opts
end
function query.ask(instruction, prompt, opts, api_key)
local url = 'https://generativelanguage.googleapis.com'
local path = '/v1beta/models/gemini-1.5-pro-latest:generateContent'
curl.post(url .. path,
{
headers = {
['Content-type'] = 'application/json',
['x-goog-api-key'] = api_key
},
body = json.encode(
{
-- Big, very big body
}),
callback = function(res)
vim.schedule(function() query.askCallback(res, opts) end)
end
})
end
return query
- Dominant language
- Lua
- Stars
- 3.5k
- Forks
- 340
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nvim-lua/plenary.nvim
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
nvim-lua/plenary.nvim#682 ·
-
uniform usage of `os.getenv`Possibly taken @rakotomandimby claimed this 116 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
nvim-lua/plenary.nvim#680 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
nvim-lua/plenary.nvim#675 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
nvim-lua/plenary.nvim#672 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
nvim-lua/plenary.nvim#671 · 1 comment ·
All issues in nvim-lua/plenary.nvim
Similar issues
-
omarchy-menu-keybindings lua bind scan spins at 100% CPU when user config iterates a mocked hl APIOpen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
omacom/omarchy#14302 · 1 comment ·
Maintainers usually reply within 1 day
-
BUG
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
linuxmint/cinnamon-spices-applets#9091 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
PathOfBuildingCommunity/PathOfBuilding-PoE2#2560 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Nevcairiel/GatherMate2#62 ·