Python Client for Bing Chat, also known as Sydney.
Project description
Sydney.py
Python Client for Bing Chat, also known as Sydney.
Note This is an unofficial client.
Requirements
- Python 3.10 or newer
- Microsoft account with access to Bing Chat
Installation
To install Sydney.py, run the following command:
pip install sydney-py
or, if you use poetry:
poetry add sydney-py
Usage
To use Sydney.py you first need to extract the _U
cookie from Bing.
Then, set it as an environment variable:
export BING_U_COOKIE=<your-cookie>
Then, you can use the provided Sydney Client:
import asyncio
from sydney import SydneyClient
async def main() -> None:
sydney = SydneyClient()
await sydney.start_conversation(style="balanced")
response = await sydney.ask("Hello, how are you?")
print(response)
await sydney.close_conversation()
if __name__ == "__main__":
asyncio.run(main())
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sydney_py-0.6.1.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for sydney_py-0.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99f7c8964a45236b1fc26c42326cc4a9148de3bf3e308a132dbff36076d3caa0 |
|
MD5 | e82901d7f77fdfe60b7a8698cc2eef1e |
|
BLAKE2b-256 | d9f2581fc9f66090aef4a8a3832cf5237a40c6a2d35a4010f1b7fa072c61b6d7 |