webmaster-kazu.com

テクノロジー・データ分析・実践ログ・その他

Bing Chat 用の Python非公式クライアント「Sydney」のインストール

カテゴリ: Python【初歩から現場実務的なもの】

Bing Chat 用の Python非公式クライアント「Sydney」のインストールについて解説しています。

「Sydney」(https://github.com/vsakkas/sydney.py)は、Microsoft の AI を活用したパーソナルアシスタントである Bing Chat に接続し質問したり会話したりすることができるPythonのライブラリです。なお、マイクロソフトが公式に配布しているライブラリではないことを理解しておいてください。

■Python

今回のPythonのバージョンは、「3.9.9」を使用しています。(Windows11)(Pythonランチャー使用)

■Sydneyをインストールする

Sydneyをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。

pip install sydney-py

起動後、上記のコマンドを入力し、Enterキーを押します。

py -3.9 -m pip install sydney-py

なお、今回は上記のPythonバージョンを指定したコマンドを入力し、WindowsにインストールしてあるPythonを切り替えてインストールする。そのためにEnterキーを押します。

Defaulting to user installation because normal site-packages is not writeable

Collecting sydney-py

Downloading sydney_py-0.12.0-py3-none-any.whl (10 kB)

Collecting websockets<11.0,>=10.4

Downloading websockets-10.4-cp39-cp39-win_amd64.whl (101 kB)

|████████████████████████████████| 101 kB 1.6 MB/s

Collecting aiohttp<4.0.0,>=3.8.4

Downloading aiohttp-3.8.4-cp39-cp39-win_amd64.whl (323 kB)

|████████████████████████████████| 323 kB 6.8 MB/s

Collecting frozenlist>=1.1.1

Downloading frozenlist-1.3.3-cp39-cp39-win_amd64.whl (34 kB)

Collecting charset-normalizer<4.0,>=2.0

Downloading charset_normalizer-3.1.0-cp39-cp39-win_amd64.whl (97 kB)

|████████████████████████████████| 97 kB 6.4 MB/s

Collecting aiosignal>=1.1.2

Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)

Collecting async-timeout<5.0,>=4.0.0a3

Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB)

Collecting multidict<7.0,>=4.5

Downloading multidict-6.0.4-cp39-cp39-win_amd64.whl (28 kB)

Collecting attrs>=17.3.0

Downloading attrs-23.1.0-py3-none-any.whl (61 kB)

|████████████████████████████████| 61 kB 1.3 MB/s

Collecting yarl<2.0,>=1.0

Downloading yarl-1.9.2-cp39-cp39-win_amd64.whl (61 kB)

|████████████████████████████████| 61 kB 40 kB/s

Collecting idna>=2.0

Downloading idna-3.4-py3-none-any.whl (61 kB)

|████████████████████████████████| 61 kB ...

Installing collected packages: multidict, idna, frozenlist, yarl, charset-normalizer, attrs, async-timeout, aiosignal, websockets, aiohttp, sydney-py

WARNING: The script normalizer.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Successfully installed aiohttp-3.8.4 aiosignal-1.3.1 async-timeout-4.0.2 attrs-23.1.0 charset-normalizer-3.1.0 frozenlist-1.3.3 idna-3.4 multidict-6.0.4 sydney-py-0.12.0 websockets-10.4 yarl-1.9.2

WARNING: You are using pip version 21.2.4; however, version 23.1.2 is available.

You should consider upgrading via the 'C:\Program Files\Python39\python.exe -m pip install --upgrade pip' command.

Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、Sydneyが正常にインストールされたことになります。なお、WARNING(警告)が出力されていますが、エラーではないので、今回は一旦無視しています。

今回は、Sydneyのバージョン0.12.0をインストールしました。