deep learning toolbox for LinXueyuan
Project description
deeplin
Deep Learning Toolbox for LinXueyuan
Hexin Server
启动 FastAPI 服务器以代理 OpenAI API 并使用 hexin_engine 后端处理请求。
python -m deeplin.inference_engine.hexin_server
python -m deeplin.inference_engine.hexin_server --host 0.0.0.0 --port 8777
服务器使用固定的 API key 进行认证:
from openai import OpenAI
OPENAI_API_KEY="sk-deeplin-fastapi-proxy-key-12345"
OPENAI_BASE_URL="http://localhost:8777/v1"
client = OpenAI(
api_key=OPENAI_API_KEY,
base_url=OPENAI_BASE_URL,
)
messages = [
{"role": "user", "content": "Hello!"},
]
response = client.chat.completions.create(
model="gpt-4o",
messages=messages,
)
print(response.choices[0].message.content)
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
deeplin-0.1.43.tar.gz
(17.8 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
File details
Details for the file deeplin-0.1.43.tar.gz.
File metadata
- Download URL: deeplin-0.1.43.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.10.9 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1965e8e2ac2b507675465da7a03df13a253420506a65b76c4da37ae66a97922f
|
|
| MD5 |
be15372b61b2c2785817d7c95589a3b8
|
|
| BLAKE2b-256 |
6269fb18abf4a4c4111c2a26b1c33a1d3c61c6ca064b894d1891dd37e3be0432
|
File details
Details for the file deeplin-0.1.43-py2.py3-none-any.whl.
File metadata
- Download URL: deeplin-0.1.43-py2.py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.10.9 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca67b98655a928970189204161465627884b28d1be9f5339b6a98585d48b9f7d
|
|
| MD5 |
d75de7407de0badb2bebd75fbf370353
|
|
| BLAKE2b-256 |
2e1892477a5787ad74701487e88d2865650525f92c951f6107f7e6cd9a547cc7
|