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.41.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.41-py2.py3-none-any.whl (22.9 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: deeplin-0.1.41.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.41.tar.gz
Algorithm Hash digest
SHA256 6337c07b2954e55f035ad2453761c6dd9f74e4cce57f59b9f863f38750450705
MD5 dcc44bf507e3711e33309df86db4a800
BLAKE2b-256 1b8ffa0b4dccbd0c82c2c975ae977c66a83cb02c3500006d7e2f1a35995ac360

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deeplin-0.1.41-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.41-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 66bcd20f1fa514c5b42de419da40592439f36f6b115fdff6ea07477f1a06102a
MD5 1174c43bc34455751794992f30dca144
BLAKE2b-256 810070b5607e1c92f072bb9ce259fb193710aad29c5be54eebdcf3dad99ebd68

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