oy3o / bing

perfect and logical reverse code implements the event-based API and websocket interface of Bing Chat.
1 stars 0 forks source link

ERROR: git+https://github.com/oy3o/bing.git does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found. #1

Open noseon opened 1 year ago

noseon commented 1 year ago

ERROR: git+https://github.com/oy3o/bing.git does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

oy3o commented 1 year ago

Dependencies are still under development, so direct installation is not recommended. Currently you can use this method to temporarily use it

  1. mkdir /home/$USER/python/github, create a folder for github's python code
  2. cd /home/$USER/python/github, enter the folder
  3. git clone --recursive https://github.com/oy3o/oy3opy.git, clone the main repo
  4. export PYTHONPATH=$PATHONPATH:/home/$USER/python/github, add the directory in your environment variable

then, use it in your code.

oy3o commented 1 year ago

It is worth mentioning that using the more advanced API under https://github.com/oy3o/ai will have a better experience than using the low-level API of bing. Even you can still do it.

oy3o/ai usage:

chat with bing

chat = Chat('bing', cookie, listeners, proxy)
await chat.update('your context')
print(await chat.send_once('what is the realtime?'))

# or stream
async for chunk in chat.send('what is the time on page?'):
    print(chunk, end='', flush=True)

ask once

print(await exec_once('hello', None, 'bing', Config({
    'cookies': {'bing': cookie},
    'listeners': {'bing': listeners},
    'proxies': {'bing': proxies},
})))

# or stream
async for chunk in exec('hello', context=''):
    print(chunk, end='', flush=True)

tasks chain

ResponseChain = execTasksChain_once([
    [{'model':'bing', 'prompt':'What is Goldbach Conjecture 1+1'},{'model':'bing', 'prompt':'What is Peano axioms 1+1'}],
    [{'model':'bing', 'prompt':'No Search, what is 1+1 means in math?'}]
])