-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpytgpt.lua.cfg
38 lines (35 loc) · 1.4 KB
/
pytgpt.lua.cfg
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
name = "pyTerminal GPT (pytgpt)"
url = "https://github.com/Simatwa/python-tgpt/releases"
exe = "pytgpt"
sessionFile = _isWindows and _pathjoin("%LOCALAPPDATA%", "smartwa", "pytgpt", "Cache", "chat-history-%s.txt")
or _pathjoin("~", ".cache", "pytgpt", "chat-history-%s.txt")
predefined = {
--pytgpt gpt4free list providers -w
provider={
"",
-- "leo", "llama2", "webchatgpt",
"openai","opengpt","koboldai","gemini","phind","blackboxai","gpt4all","g4fauto","poe","groq","perplexity",},
awesome_prompt=_import("awesome.list",{}),
}
return function (session, provider, apikey, model, temperature, max_tokens, top_p, top_k, intro, history_offset, awesome_prompt, extra)
return _pipeOut(exe, _context) {
"generate --quiet",
session and _optional("--filepath", session, sessionFile)
or "--disable-conversation",
_optional("--provider", provider),
_optional("--key", apikey),
_optional("--model", model),
_optional("--temperature", temperature),
_optional("--max-tokens", max_tokens),
_optional("--top-p", top_p),
_optional("--top-k", top_k),
_optional("--intro", intro),
_optional("--history-offset", history_offset),
_optional("--awesome-prompt", awesome_prompt),
_optional(extra)
}
end,
--getModels
_readLines(exe.." gpt4free list providers -w", function (line)
return line:match"^│ %d+%s+│ (%w+)"
end, "provider")