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
    • 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.
    • pyexecjs: JS execution for authentication.
    • 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.1.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.1.0-py3-none-any.whl (6.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nju_deepseek-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 9eec16deb2285f5949124125f1d81c887bb0a35f759b805789cbed188fe4ea9e
MD5 33e92f25432bcf0d47993d6f62686122
BLAKE2b-256 e50191b679808a2be563010e10af175c4073da36cf2ebf456a44c66680e75431

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nju_deepseek-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b9cd58b8e9634743ec97da70dec047ced53b3d742287afed07dda6ad0a01e0d
MD5 6c229cc1f73d38416addff4d4b9b5c28
BLAKE2b-256 7f06341dea0b5a7431dbf0419aa790675d2ac8d6b6ac41d31401a3f1e7005e13

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