This is a personal library developed by Qichang Zheng.
Installation
pip install qichang
LLM Conversation
For single conversation
import qichang
llm = qichang.LLM_API()
llm.chat('GPT3.5', 'Hello, how are you?')
llm.chat('GPT4', 'Hello, how are you?')
For multi-turn conversation
We currently have two servers in Virginia and Singapore. This function will automatically choose the server with the lowest latency, but you can also manually set the server.
import qichang
llm = qichang.LLM_API()
# Manually set the server
# llm.server = 'Virginia'
# llm.server = 'Singapore'
# Here we need to specify the chatID (string) to distinguish different conversations
llm.chat('GPT3.5', 'Hello, how are you?', 'ChatID')
llm.chat('GPT4', 'What did I just asked?', 'ChatID')
Model Downloader
This is a tool to download the huggingface models in China. Note that this function only works for some models, the author is working on further improvement.
import qichang
downloader = qichang.Model_Downloader()
downloader.download('Qwen/Qwen-7B-Chat', 'test') # Download the model to the folder 'test'
Davinci Embedding
This is a tool to get the embedding of the text from the Davinci model.
import os
import qichang
os.environ["OPENAI_API_KEY"] = "your_api_key"
Embedder = qichang.Embedder()
Embedder.embedding('Hello, how are you?')
Metadata
Release files for qichang 0.0.59
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qichang-0.0.59.tar.gz | 12.2 kB | Without provenance | Details for qichang-0.0.59.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qichang-0.0.59-py3-none-any.whl | Python 3 | none | any | Details for qichang-0.0.59-py3-none-any.whl |
Total release size: 28.4 kB
Release files / qichang-0.0.59.tar.gz
| Download URL | qichang-0.0.59.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf758a89fbde68ee63c8d383aa8a5da02cf1a70fe69862ce1dd016051ffab6d6
|
|
BLAKE2b-256 checksum How to use checksums |
9a98f5b02892c802900e7e37244f0f447b8823332acde75769d13c8f495b856e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Release files / qichang-0.0.59-py3-none-any.whl
| Download URL | qichang-0.0.59-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d1418ec2000203ef1ed798a2d2f7e803d22073401626bfbfc2e4c10a3091c7f
|
|
BLAKE2b-256 checksum How to use checksums |
441e8eadeda4e1c6b11ac76d97e9a7c221a6a8d2704b9b9f2bd79816f216f74e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Security for qichang 0.0.59
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.