up
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@ bin/
|
||||
test/
|
||||
*.log
|
||||
*.db
|
||||
demo/
|
||||
@@ -3,7 +3,7 @@ WORKDIR /frontend-build
|
||||
COPY ./web/ .
|
||||
RUN npm install && npm run build && rm -rf node_modules
|
||||
|
||||
FROM golang:1.19-alpine as builder
|
||||
FROM golang:1.21-alpine as builder
|
||||
LABEL anther="github.com/Sakurasan"
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk --no-cache add make cmake upx
|
||||
WORKDIR /build
|
||||
@@ -11,7 +11,7 @@ COPY --from=frontend /frontend-build/dist /build/dist
|
||||
COPY . /build
|
||||
ENV GO111MODULE=on
|
||||
# ENV GOPROXY=https://goproxy.cn,direct
|
||||
CMD [ "go mod download" ]
|
||||
CMD [ "go mod tidy","go mod download" ]
|
||||
RUN make build
|
||||
|
||||
FROM alpine:latest AS runner
|
||||
|
||||
@@ -155,7 +155,8 @@ func Cost(model string, promptCount, completionCount int) float64 {
|
||||
case "gemini-1.5-pro-latest":
|
||||
cost = (0.00025/1000)*float64(prompt) + (0.0005/1000)*float64(completion)
|
||||
|
||||
// Mistral AI
|
||||
// Mistral AI
|
||||
// https://docs.mistral.ai/platform/pricing/
|
||||
case "mistral-small-latest":
|
||||
cost = (0.002/1000)*float64(prompt) + (0.006/1000)*float64(completion)
|
||||
case "mistral-medium-latest":
|
||||
|
||||
Reference in New Issue
Block a user