No project description provided
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()
response = await sydney.ask("Hello, how are you?")
print(response["item"]["messages"][1]["text"])
await sydney.close()
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.3.0.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for sydney_py-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f240c31b1e236366b647c23f780517cde660045ea40adb2f4b2fa62429b11c2 |
|
MD5 | 52f4263f7c407d7dafc0dd9aada88011 |
|
BLAKE2b-256 | b9af24a81657d80298a9829a8b957effab746a2c47482f6fb782c0bf6b37ec36 |