Skip to main content

deep learning toolbox for LinXueyuan

Project description

deeplin

Deep Learning Toolbox for LinXueyuan

Hexin Server

详见 docs/README_FASTAPI.md

启动 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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deeplin-0.1.43-py2.py3-none-any.whl (22.9 kB view details)

Uploaded Python 2Python 3

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

Hashes for deeplin-0.1.43.tar.gz
Algorithm Hash digest
SHA256 1965e8e2ac2b507675465da7a03df13a253420506a65b76c4da37ae66a97922f
MD5 be15372b61b2c2785817d7c95589a3b8
BLAKE2b-256 6269fb18abf4a4c4111c2a26b1c33a1d3c61c6ca064b894d1891dd37e3be0432

See more details on using hashes here.

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

Hashes for deeplin-0.1.43-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ca67b98655a928970189204161465627884b28d1be9f5339b6a98585d48b9f7d
MD5 d75de7407de0badb2bebd75fbf370353
BLAKE2b-256 2e1892477a5787ad74701487e88d2865650525f92c951f6107f7e6cd9a547cc7

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