使用 openai-python ,openai-node 会有额外的 x-stainless
系列请求头,特此记录一下,大概是记录了一些平台架构信息,但是这些请求头不常见,所以使用 ollama等平台的时候,允许cors的时候,最好通过 nginx 代理,允许这些头,否则会请求接口失败
https://community.openai.com/t/system-data-is-there-a-way-to-opt-out/625026/2
x-stainless-os: "MacOS"
x-stainless-arch: "arm64"
x-stainless-lang: "python"
x-stainless-async: false
x-stainless-runtime: "CPython"
x-stainless-package-version: "1.12.0"
x-stainless-runtime-version: "3.11.7"
"X-Stainless-Lang": "python",
"X-Stainless-Package-Version": version,
"X-Stainless-OS": str(get_platform()),
"X-Stainless-Arch": str(get_architecture()),
"X-Stainless-Runtime": get_python_runtime(),
"X-Stainless-Runtime-Version": get_python_version(),
发表评论