2
0
Fork 0
anthropic.nvim/lua/anthropic/util/meta.lua

31 lines
1.2 KiB
Lua
Raw Normal View History

2024-05-04 20:32:00 +02:00
---@meta [util]
2024-05-03 01:22:56 +02:00
---@alias curl_callback fun(deserialized: table<string, any>)
---@class curl_opts
---@field url string The url to make the request to
---@field query table url query, append after the url
---@field body string | table The request body, can be a path to a file
---@field auth string | table Basic request auth, 'user:pass', or {"user", "pass"}
---@field form table request form
---@field raw table any additonal curl args
---@field dry_run boolean whether to return the args to be ran through curl
---@field output string download destination filepath
---@field timeout integer request timeout in mseconds
---@field http_version "HTTP/0.9" | "HTTP/1.0" | "HTTP/1.1" | "HTTP/2" | "HTTP/3" HTTP version to use
---@field proxy string proxy url in this format: [protocol://]host[:port]
---@field insecure boolean Allow insecure server connections
---@class curl_response
---@field exit integer The shell process exit code
---@field status integer The https response status
---@field headers table The https response headers
---@field body string The http response body
2024-05-04 20:32:00 +02:00
---@alias message { role: "user" | "assistant", content: string }
---@class session
---@field name string
---@field messages message[]
---@field system_prompt string?