Skip to main content

A Python package for accessing agents listed on https://chat.nju.edu.cn/deepseek via command-line interface.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

nju-deepseek

A Python package for accessing agents listed on https://chat.nju.edu.cn/deepseek via command-line interface.

Table of Contents

Installation

pip install nju-deepseek
# For automatic authentication (optional but recommended)
pip install 'nju-deepseek[auth]'
# For available cli (optional)
pip install 'nju-deepseek[cli]'

Usage

Command-Line Interface

The package provides a CLI tool named chat for interactive conversations:

chat

Or access by running module directly:

python3 -m nju_deepseek

Programmatic Usage

Import the Chat class from nju_deepseek for custom applications:

from nju_deepseek import Chat

with Chat('username', 'password', 'cookiefile') as chat:
    for agent in chat.available_agents():
        print(agent)
    chat.connect_to_agent('QwQ-32B')
    chat.new_dialogue()
    chat.send_msg('hello!')
    for token in chat.iter_response():
        print(token, end='', flush=True)

Features

  • Fully Automated Authentication
    • nju-login is copied to this project for authentication.
    • ddddocr 1.0.6 is copied to this project for captcha recognization.
  • Cookie Persistence
  • Markdown Export

Todo

  • Support recovering from dialogues.
  • Handle reconnection better.
  • Support more agents.

Dependencies

  • Authentication

    • lxml
    • onnxruntime
    • pillow
    • pycryptodomex
    • requests
    • tenacity
  • Chat Session

    • python-socketio[client]
    • websocket-client
  • Config and Cache File Placement:

    • platformdirs
  • REPL

    • prompt-toolkit

Home Page

Project URL: https://github.com/Nemowang2003/nju-deepseek

Contributions are welcome, as I will be leaving NJU soon.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nju_deepseek-0.3.1.tar.gz (6.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nju_deepseek-0.3.1-py3-none-any.whl (6.8 MB view details)

Uploaded Python 3

File details

Details for the file nju_deepseek-0.3.1.tar.gz.

File metadata

  • Download URL: nju_deepseek-0.3.1.tar.gz
  • Upload date:
  • Size: 6.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.12

File hashes

Hashes for nju_deepseek-0.3.1.tar.gz
Algorithm Hash digest
SHA256 3215ae516791dd6d39de350489df89914602e9a127a7b5625060f44f09690809
MD5 8e675c4c1c51da350c2449e2d9f395fd
BLAKE2b-256 c718c5fefab2c479503bee210854871e4a4fa0c98768c6afbb50726de0e4f380

See more details on using hashes here.

File details

Details for the file nju_deepseek-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nju_deepseek-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 752fc2f4bd0980242a058e5d5be34d95d78cfbaebbbf8487054f84009a89505c
MD5 59ba8703ec9c9d6d1575313a602448ab
BLAKE2b-256 4a3793aa50341fff791c1e364a2944234140962cbd5fa303c75554c1db9491b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page