-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathporfirevich.lua
More file actions
51 lines (35 loc) · 1.28 KB
/
porfirevich.lua
File metadata and controls
51 lines (35 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--[[
Porfirevich (=0.6.1)
Является "портом" porfirevich.ru
Нейросеть Порфирьевич дописывает любые тексты и стихи на русском языке.
text {pf}$
Является больше примером
by https://t.me/wavecat
--]]
require "com.wavecat.inline.libs.colorama"
require "com.wavecat.inline.libs.http"
colorama.init(inline)
local function pf(input, query)
local json = luajava.newInstance("org.json.JSONObject")
json:put("prompt", query:replaceExpression(""))
json:put("length", 30)
local request =
http.Request.Builder.new():url("https://pelevin.gpt.dobro.ai/generate/"):post(
http.buildBody(json:toString(), "application/json")
):build()
query:answer(colorama.italic("loading..."))
http.call(
request,
function(_, response, string)
if response:code() ~= 200 then
query:answer()
return
end
local json = luajava.newInstance("org.json.JSONObject", string)
query:answer(colorama.font(json:getJSONArray("replies"):getString(0), "#8AB4F8"))
end
)
end
return function(module)
module:registerCommand("pf", colorama.wrap(pf), "Adds any texts and poems in Russian")
end