fix: ship updatable 1.1.1 source archives
Package a clean shallow main checkout with credential-free Gitea remote, localize the China launcher, and set the new-install Responses endpoint.
This commit is contained in:
1 parent
bfcd828fa8
commit
8522fa3ca3
22 files changed
+445
-140
No files matched your search
@@ -16,7 +16,7 @@ _write_lock = threading.Lock()
|
||||
|
||||
|
||||
class ModelSettingsUpdate(BaseModel):
|
||||
base_url: str = "https://api.openai.com/v1"
|
||||
base_url: str = "https://api-n-cd.playones.com/v1"
|
||||
model: str = Field(min_length=1, max_length=200)
|
||||
api_key: SecretStr | None = None # Omitted/blank keeps the existing key.
|
||||
timeout_seconds: float = Field(default=300, gt=0, le=3600)
|
||||
@@ -41,7 +41,7 @@ class ModelSettingsUpdate(BaseModel):
|
||||
):
|
||||
raise ValueError("请输入有效的 HTTP(S) 接口根地址,不要包含密钥、查询参数或片段")
|
||||
if value.endswith(("/responses", "/chat/completions")):
|
||||
raise ValueError("请输入接口根地址,例如 https://api.openai.com/v1")
|
||||
raise ValueError("请输入接口根地址,例如 https://api-n-cd.playones.com/v1")
|
||||
return value
|
||||
|
||||
@field_validator("model")
|
||||
@@ -57,7 +57,7 @@ def get_model_settings() -> dict:
|
||||
return {
|
||||
"provider": "openai",
|
||||
"api_mode": "responses",
|
||||
"base_url": settings.OPENAI_BASE_URL or "https://api.openai.com/v1",
|
||||
"base_url": settings.OPENAI_BASE_URL or "https://api-n-cd.playones.com/v1",
|
||||
"model": settings.OPENAI_MODEL,
|
||||
"api_key_configured": bool(settings.OPENAI_API_KEY),
|
||||
"timeout_seconds": settings.OPENAI_TIMEOUT_SECONDS,
|
||||
|
||||
Reference in new issue
Block a user