Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing npm module runs the command line script instead #1

Closed
gzz2000 opened this issue Apr 18, 2023 · 3 comments
Closed

Importing npm module runs the command line script instead #1

gzz2000 opened this issue Apr 18, 2023 · 3 comments

Comments

@gzz2000
Copy link

gzz2000 commented Apr 18, 2023

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
@lonelam lonelam pinned this issue Apr 19, 2023
@lonelam
Copy link
Owner

lonelam commented Apr 19, 2023

Thanks for raising the issue.

@lonelam
Copy link
Owner

lonelam commented Apr 20, 2023

fixed.

@lonelam lonelam closed this as completed Apr 21, 2023
@gzz2000
Copy link
Author

gzz2000 commented Apr 21, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants