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.44.tar.gz (18.5 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.44-py2.py3-none-any.whl (24.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file deeplin-0.1.44.tar.gz.

File metadata

  • Download URL: deeplin-0.1.44.tar.gz
  • Upload date:
  • Size: 18.5 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.44.tar.gz
Algorithm Hash digest
SHA256 7f2e0bb1ec0dd16d05f8a049962546cd7767813bacce0bb3503e030d443713f4
MD5 7e2c0d0de50974d2f8922e5f403a0b64
BLAKE2b-256 55ab0f56adef13ed3d442d409f4a14be0cdf5c791653e5a162c769531f213163

See more details on using hashes here.

File details

Details for the file deeplin-0.1.44-py2.py3-none-any.whl.

File metadata

  • Download URL: deeplin-0.1.44-py2.py3-none-any.whl
  • Upload date:
  • Size: 24.2 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.44-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7eaa9a7604f3000e275e59f1f21b86de30796dca8a33056c84e5e6749cda51d8
MD5 fd1e553af80b74d8b0e7d12ed46548c4
BLAKE2b-256 52f67389aa38f019dc63d71acc669da5874dae9be62f4c45b140769750bfa3fb

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