Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
2de5a21
feat: 实现 Responses→ChatCompletions 协议转换核心逻辑
Rosons May 31, 2026
2ae5446
feat: 添加 Responses 协议降级策略配置与入口
Rosons May 31, 2026
2a28e92
feat: 添加工具 strict 字段支持,默认主题改为 default
Rosons May 31, 2026
c320623
feat(web): default 主题添加 Responses→ChatCompletions 配置界面
Rosons May 31, 2026
133fbf3
feat(i18n): 添加 default 主题协议转换配置相关翻译
Rosons May 31, 2026
246aa1e
feat(web): classic 主题添加 Responses→ChatCompletions 配置界面
Rosons May 31, 2026
0421e26
docs: 协议转换核心代码添加中文注释
Rosons May 31, 2026
0f9ead6
Merge branch 'QuantumNous:main' into main
Rosons May 31, 2026
6846681
chore: PostgreSQL 数据存储改为本地目录挂载
Rosons May 31, 2026
ff9e2fb
fix: 恢复 docker-compose.yml 原始配置
Rosons May 31, 2026
ffe145a
chore: Dockerfile 添加 GOPROXY 国内代理加速构建
Rosons May 31, 2026
7ec0e9d
feat: docker-compose 改为本地构建镜像
Rosons May 31, 2026
9f2eba6
perf: Dockerfile 添加 Go 模块缓存加速重复构建
Rosons May 31, 2026
d8ae978
perf: Dockerfile 添加 Go 构建缓存避免磁盘空间不足
Rosons May 31, 2026
605bc9c
fix: Dockerfile 设置 GOTMPDIR 避免编译临时文件写满根分区
Rosons May 31, 2026
f01fe75
perf: Dockerfile 添加 Go 构建缓存避免重复下载和磁盘不足
Rosons May 31, 2026
27dbc94
Merge branch 'main' into main
Rosons Jun 3, 2026
f62c90f
fix(openaicompat): Responses工具转换时过滤空name的function tool
Rosons Jun 3, 2026
6642c9d
Merge branch 'QuantumNous:main' into main
Rosons Jun 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Dockerfile

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请不要在 Dockerfile 中引入无意义的部分 (配置镜像/配置缓存) 或者说请不要提交本地测试用的 Dockerfile

Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ ENV GO111MODULE=on CGO_ENABLED=0

ARG TARGETOS
ARG TARGETARCH
ARG GOPROXY=https://goproxy.cn,direct
ENV GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH:-amd64}
ENV GOEXPERIMENT=greenteagc
ENV GOPROXY=${GOPROXY}

WORKDIR /build

ADD go.mod go.sum ./
RUN go mod download
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/cache/go-build \
GOCACHE=/cache/go-build go mod download

COPY . .
COPY --from=builder /build/web/default/dist ./web/default/dist
Expand Down
2 changes: 1 addition & 1 deletion common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var TopUpLink = ""
var themeValue atomic.Value // stores string; safe for concurrent read/write

func init() {
themeValue.Store("classic")
themeValue.Store("default")
}

func GetTheme() string {
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ version: '3.4' # For compatibility with older Docker versions

services:
new-api:
image: calciumion/new-api:latest
#image: calciumion/new-api:latest
build: .
container_name: new-api
restart: always
command: --log-dir /app/logs
Expand Down
1 change: 1 addition & 0 deletions dto/openai_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ type FunctionRequest struct {
Description string `json:"description,omitempty"`
Name string `json:"name"`
Parameters any `json:"parameters,omitempty"`
Strict *bool `json:"strict,omitempty"`
Arguments string `json:"arguments,omitempty"`
}

Expand Down
Loading