一个用于从GitLab下载和处理模型的Python SDK
Project description
ShangshanAI SDK
一个用于下载和处理数据的Python SDK。
安装
pip install shangshanAI
下载模型
from shangshanAI import snapshot_download
model_dir = snapshot_download('testuser/model_llm')
print(model_dir)
功能特性
- 支持文件下载
- 自动重试机制
- 进度显示
调用大模型
from shangshanAI import ShangshanAI
client = ShangshanAI(api_key="BkdNcaHp6YUxvYsp6PpzMq", path="/v1/chat/completions") # 请填写您自己的API Key
response = client.chat.completions.create(
model="shangshan-chat-beta", # 填写需要调用的模型编码
messages=[
{"role": "user", "content": "你好!你叫什么名字"},
],
stream=True,
)
for chunk in response:
print(chunk.choices[0].delta.content, end="", flush=True)
许可证
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shangshanai-0.1.10.tar.gz
(101.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
shangshanAI-0.1.10-py3-none-any.whl
(150.0 kB
view details)
File details
Details for the file shangshanai-0.1.10.tar.gz.
File metadata
- Download URL: shangshanai-0.1.10.tar.gz
- Upload date:
- Size: 101.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa1442051f2cf5a2aa2b8a9c6237901c55ca09d82896e24c81b634da9e4057d0
|
|
| MD5 |
b18fb9b09a0f86aea0153468b537a208
|
|
| BLAKE2b-256 |
7ce2cc7e508bcfbd64f3eee3ee17539335543f9a4bd3b647e55ed9b106c17b85
|
File details
Details for the file shangshanAI-0.1.10-py3-none-any.whl.
File metadata
- Download URL: shangshanAI-0.1.10-py3-none-any.whl
- Upload date:
- Size: 150.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98cee1a7deb2a579a66a81e5c099d15130a9a111fec982628653b6ee572baf53
|
|
| MD5 |
e05af6747bc79414d9b735bcfb44297b
|
|
| BLAKE2b-256 |
e96301e3da426bea59faccb2bde7d9a2f56ee5870a4a22abb5622d3dae4ff984
|