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 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.0.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.0-py3-none-any.whl (6.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nju_deepseek-0.3.0.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.0.tar.gz
Algorithm Hash digest
SHA256 9451f153f954a4a9b0b954c01aa4b2b2e9f91f2a647a38c073b1dc7ce4e51632
MD5 4cae29fe6a7b2d84fe0f667a78678042
BLAKE2b-256 9649ba307272cdf67ec1e71876561dfc5a6b724dba77e3608bcb1cf051f96ae4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nju_deepseek-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa2970c5864ec843296491ee9de7b633b0026fb7cfdf21536202733178a0c3a1
MD5 0826f1d7fba6f2b5d54a5dadf75b239b
BLAKE2b-256 443890f0507f14173fec7516be5ebc5cf2b19be6d4c332bebd7ae60412cf9b76

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