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 completion features (optional)
pip install 'nju-deepseek[completion]'

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.
  • Support reconnection.
  • Support other agents.

Dependencies

  • Core:

    • onnxruntime: For captcha recognization.
    • python-socketio: Client for chat session.
  • Optional:

    • prompt-toolkit: Advanced command-line interact experience.

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nju_deepseek-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b33e0ca76290919fff3ecaed45474cb831b0d7d647f89f91b7deed8b8a41a4c2
MD5 d9d47122864097596a49e1d43310d669
BLAKE2b-256 070f6716791e0bbd09f2eccc244e897d2ca2066343e15bd6a9b1165664f6b366

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nju_deepseek-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d35c1f80899d5d70823c17572b863c913efbe14c383decbed2865c958fe6e1b
MD5 4ee8a4714dde83089a1eb352e42dc9a9
BLAKE2b-256 d7047a68b941767d49713c219f4981f44d47e89960b3ea002b5d5e5b64de6173

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