Skip to main content

Void Terminal

The CLI & python API for the well-known project gpt_academic.

Installation

  1. source installation.
bash init.bash
  1. Pip installation (Not recommended).
pip install void-terminal

Usage (Commandline)

  • Chat
vt -a "hello, world!"
  • Ask about how to do a linux command
vt -c "List all docker containers currently running on this system"
  • Config (For all possible configurations, read config.py in the mother project.)
# Warning! This will write configuration into .bashrc and change your ENV variables !! Use with caution !! 警告,该命令会修改你的.bashrc文件,持久修改你的环境变量
vt --set_conf API_KEY "sk-123456789123456789123456789"
vt --set_conf LLM_MODEL "gpt-3.5-turbo"
vt --set_conf DEFAULT_WORKER_NUM "20"

Usage (Python API)

  • Chat without interaction
import void_terminal as vt
# For more available configurations (including network proxy, api, using chatglm etc.),
# see config.py of in the mother project:
# https://github.com/binary-husky/gpt_academic.git
vt.set_conf(key="API_KEY", value="sk-xxxxxxxxxxxxxx")   # or you can delete this line and set ENV variable
vt.set_conf(key="LLM_MODEL", value="gpt-3.5-turbo")     # or you can delete this line and set ENV variable

chat_kwargs = vt.get_chat_default_kwargs()
chat_kwargs['inputs'] = 'Hello, world!'
result = vt.get_chat_handle()(**chat_kwargs)
print('\n*************\n' + result + '\n*************\n' )
  • Using mother project's plugin (Example: translate THIS readme file to Chinese)
import void_terminal as vt
from rich.live import Live
from rich.markdown import Markdown

# vt.set_conf(key="API_URL_REDIRECT", value='{"https://api.openai.com/v1/chat/completions": "http://11.22.33.44:5566/v1/chat/completions"}')
vt.set_conf(key="API_KEY", value="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
vt.set_conf(key="LLM_MODEL", value="gpt-3.5-turbo")

plugin = vt.get_plugin_handle('void_terminal.crazy_functions.Markdown_Translate->TranslateMarkdownToSpecifiedLanguage')
plugin_kwargs = vt.get_plugin_default_kwargs()
plugin_kwargs['main_input'] = './README.md'
my_working_plugin = plugin(**plugin_kwargs)

with Live(Markdown(""), auto_refresh=False) as live:
    for cookies, chat, hist, msg in my_working_plugin:
        md_str = vt.chat_to_markdown_str(chat)
        md = Markdown(md_str)
        live.update(md, refresh=True)
  • Using mother project's plugin (Example: chat with multiple LLM models)
import void_terminal as vt
from rich.live import Live
from rich.markdown import Markdown

llm_model = "gpt-3.5-turbo&gpt-4"
vt.set_conf(key="API_KEY", value="sk-xxxxxxxxxxxxxx")
vt.set_conf(key="LLM_MODEL", value=llm_model)
plugin = vt.get_plugin_handle('void_terminal.crazy_functions.InquiryMultipleLargeLanguageModels->SimultaneousInquiry')
plugin_kwargs = vt.get_plugin_default_kwargs()
plugin_kwargs['main_input'] = 'Hello, world!'
plugin_kwargs['plugin_kwargs'] = {"advanced_arg": llm_model}
my_working_plugin = plugin(**plugin_kwargs)

with Live(Markdown(""), auto_refresh=False) as live:
    for cookies, chat, hist, msg in my_working_plugin:
        md_str = vt.chat_to_markdown_str(chat)
        md = Markdown(md_str)
        live.update(md, refresh=True)

Advanced Settings with Environment Variables

  1. SHOW_VOID_TERMINAL_LOGS. Set this Environment Variable to display void terminal logs

Metadata

Release files for void-terminal 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for void-terminal 1.1.2
File Size Uploaded
void-terminal-1.1.2.tar.gz 1.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for void-terminal 1.1.2
File Interpreter ABI Platform
void_terminal-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 3.2 MB

Release files / void-terminal-1.1.2.tar.gz

Download URL void-terminal-1.1.2.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
8d245ae58822fd4d0814308e00718d26a74e10b3814e0d09aed3fffe40f1d710
BLAKE2b-256 checksum
How to use checksums
4a086d3a616cc8d559479f3abef0b2f98851a42c33785e017ef03b1d56d899ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 colorama/0.4.4 importlib-metadata/7.1.0 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.32.1 rfc3986/1.5.0 tqdm/4.66.4 urllib3/1.26.5 CPython/3.10.12

Release files / void_terminal-1.1.2-py3-none-any.whl

Download URL void_terminal-1.1.2-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8826ca4a212fae9dff2d9548917c3dff51511af546c2a291eefbb1a1480c5261
BLAKE2b-256 checksum
How to use checksums
2d0fd01408c70e49449f5d57a422ac091eb2149540936f4268b6916aa24131cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 colorama/0.4.4 importlib-metadata/7.1.0 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.32.1 rfc3986/1.5.0 tqdm/4.66.4 urllib3/1.26.5 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page