惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
Vercel News
Vercel News
博客园_首页
Y
Y Combinator Blog
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
阮一峰的网络日志
阮一峰的网络日志
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
GbyAI
GbyAI
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
D
DataBreaches.Net
博客园 - Franky
Engineering at Meta
Engineering at Meta
量子位
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
N
Netflix TechBlog - Medium

博客园 - DHclly

Aspose.Words 合并单元格的原理、配置方式、代码示例以及常见误区 Gpustack 运行一段时间后出现 Failed to initialize NVML: Unknown Error 解决办法 wps dispimg python 解析实现参考 NVIDIA GPU 计算能力( compute capability,SM version)兼容性查询 Amazon S3 Tools:S3cmd 介绍 wsl 和win主机互相访问 nginx 根路径同时代理 http ws sse 三种请求 在 X86_64(amd64) 平台上的docker支持打包跨平台的镜像(如arm64) 以图搜图功能介绍 docker 容器调试技巧 大模型常见的概念 创建软连接的几种方式 基于node.js 的 web server 实现 对个人的警醒 jQuery对象与DOM对象之间的转换方法 【BUG】浏览器控制台提示:net::ERR_INVALID_CHUNKED_ENCODING 200 (OK) 的解决思路 实用浏览器脚本 关于Lambda表达式(箭头函数)的get属性访问器和常规的get属性访问器的差异 转换字符串为二进制编码字符串
open ai sdk 的额外请求头说明 x-stainless
DHclly · 2024-07-03 · via 博客园 - DHclly

使用 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

https://github.com/openai/openai-python/blob/7f9e85017a0959e3ba07834880d92c748f8f67ab/src/openai/_base_client.py#L1880-L1888

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(),