lonelam/EdgeGPTJs

Importing npm module runs the command line script instead

gzz2000 opened this issue · 3 comments

Currently it is not possible to use the module as a library because the command line interface (index.js) always runs. I have to build the package and import manually the lib/chathub/ChatBot.js file instead.

$ node
> const {Chatbot} = require('edgegptjs');

    EdgeGPTJs - A demo of reverse engineering the Bing GPT chatbot
    Repo: github.com/lonelam/EdgeGPTJs
    By: Lai Zenan

    !help for help

    Type !exit to exit

usage:  [-h] [--enter-once] [--no-stream] [--rich] [--proxy PROXY]
        [--wss-link WSS_LINK] [--style {creative,balanced,precise}]
        [--cookie-file COOKIE_FILE]

optional arguments:
  -h, --help            show this help message and exit
  --enter-once
  --no-stream
  --rich
  --proxy PROXY         Proxy URL (e.g. socks5://127.0.0.1:1080)
  --wss-link WSS_LINK   WSS URL(e.g. wss://sydney.bing.com/sydney/ChatHub)
  --style {creative,balanced,precise}
  --cookie-file COOKIE_FILE
                        needed if environment variable COOKIE_FILE is not set
ERROR: use --cookie-file or set environment variable COOKIE_FILE

Thanks for raising the issue.

fixed.

Thanks!