File size: 793 Bytes
f2f760a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
title: G4F Worker Proxy
sdk: docker
app_port: 7860
---

# G4F Worker Proxy

Public Hugging Face Space wrapper. The real proxy code is loaded from the
`APP_CODE_B64` Space Secret at runtime, so this repository can stay public while
the implementation stays out of the Space source tree.

Required Space Secret:

- `APP_CODE_B64`: base64-encoded private proxy module.

Optional Space Secrets / Variables:

- `PROXY_KEY`: require clients to send `Authorization: Bearer <key>` or
  `X-Proxy-Key: <key>`.
- `G4F_WORKERS_REF`: git ref to load from `gpt4free/g4f.dev`, default `main`.
- `G4F_WORKERS`: comma-separated worker files, default `qwen-worker.js`.
- `WORKER_REFRESH_SECONDS`: worker source cache TTL, default `3600`.
- `UPSTREAM_TIMEOUT_MS`: upstream request timeout, default `60000`.