-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtgpt.lua.cfg
More file actions
35 lines (31 loc) · 1.07 KB
/
tgpt.lua.cfg
File metadata and controls
35 lines (31 loc) · 1.07 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
name = "Terminal GPT (tgpt)"
url = "https://github.com/aandrew-me/tgpt/releases/latest"
--curl -sSL https://raw.githubusercontent.com/aandrew-me/tgpt/main/install | bash -s /usr/local/bin
exe = "tgpt" --tgpt-i386.exe, tgpt-amd64.exe
env = {
provider="AI_PROVIDER",
proxy="HTTP_PROXY",
model="OPENAI_MODEL",
apikey="OPENAI_API_KEY",
}
predefined = {
provider={"", "deepseek", "gemini", "groq", "isou", "kimi", "koboldai", "ollama", "openai", "phind", "pollinations", "sky"}
}
sets = {
apibase = {"model", "apikey"}
}
return function (stream, provider, model, apikey, apibase, temperature, top_p, max_tokens, role, extra)
return _pipeOut(exe, _context) {
"--quiet --disable-input-limit",
stream and "" or "--whole",
_optional("--provider", provider),
_optional("--model", model),
_optional("--key", apikey),
_optional("--url", apibase and apibase.."/chat/completions"),
_optional("--temperature", temperature),
_optional("--top_p", top_p),
_optional("--max_length", max_tokens),
_optional("--preprompt", role),
_optional(extra)
}
end