gptcli
1.0.0
Chatgpt를 명령 줄로 가져갑니다.
demo_config.json config.json 에 복사하십시오config.json 에 넣으십시오$ ./gptcli.py -h
usage: gptcli.py [-h] [-c CONFIG]
options:
-h, --help show this help message and exit
-c CONFIG path to your config.json (default: config.json) 샘플 config.json :
{
"api_key" : " sk-xxx " ,
"api_base" : " https://chat.pppan.net/v1 " ,
"model" : " gpt-3.5-turbo " ,
"context" : 2 ,
"stream" : true ,
"stream_render" : true ,
"showtokens" : false ,
"proxy" : " socks5://localhost:1080 " ,
"prompt" : [
{ "role" : " system " , "content" : " If your response contains code, show with syntax highlight, for example ```js n code n ``` " }
]
}gpt-3.5-turbo 입니다. 선택은 다음과 같습니다.api_base 에 대한 요청에는 http/https/socks4a/socks5 프록시를 사용합니다.콘솔 도움말 (Tab-Complete 포함) :
gptcli > .help -v
gptcli commands (use ' .help -v ' for verbose/ ' .help <topic> ' for details):
======================================================================================================
.edit Run a text editor and optionally open a file with it
.help List available commands or provide detailed help for a specific command
.load Load conversation from Markdown/JSON file
.multiline input multiple lines, end with ctrl-d(Linux/macOS) or ctrl-z(Windows). Cancel
with ctrl-c
.prompt Load different prompts
.quit Exit this application
.reset Reset session, i.e. clear chat history
.save Save current conversation to Markdown/JSON file
.set Set a settable parameter or show current settings of parameters
.usage Tokens usage of current session / last N days, or print detail billing infoDocker에서 실행 :
# build
$ docker build -t gptcli:latest .
# run
$ docker run -it --rm -v $PWD /.key:/gptcli/.key gptcli:latest -h
# for host proxy access:
$ docker run --rm -it -v $PWD /config.json:/gptcli/config.json --network host gptcli:latest -c /gptcli/config.json.multiline 명령을 통해) .save 및 .load 명령) llama_index 와 통합하여 문서와의 채팅을 지원하십시오