|
Download README.md from g2i/oapi: direct link, hf CLI and curl.
- Browser
- Download file 791 Bytes
-
https://huggingface.co/spaces/g2i/oapi/resolve/main/README.md
- Command line
-
hf download hf://spaces/g2i/oapi/README.md
-
curl -L -o README.md https://huggingface.co/spaces/g2i/oapi/resolve/main/README.md
791 Bytes
| title: My OpenAI Proxy (Stream/Non-Stream) | |
| emoji: 🚀 | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: gradio | |
| sdk_version: 3.45.0 | |
| python_version: 3.9 | |
| app_file: app.py | |
| app_port: 7860 | |
| # GPT-OSS to OpenAI API Proxy | |
| 这是一个代理服务,它将标准的OpenAI API请求转换为 `gpt-oss.com` 所需的格式。 | |
| **此版本支持流式和非流式响应。** | |
| ## 如何使用 | |
| 将您的API客户端的 `base_url` 指向本Space的URL,然后使用`/v1/chat/completions`端点。 | |
| ### 流式请求 (会返回思考过程) | |
| ```bash | |
| curl https://YOUR_SPACE_URL/v1/chat/completions \ | |
| -H "Content-Type: application/json" \ | |
| -H "Authorization: Bearer sk-any-key-works" \ | |
| -d '{ | |
| "model": "gpt-oss-120b", | |
| "messages": [{"role": "user", "content": "你好吗?"}], | |
| "stream": true | |
| }' |