use standard go mod name

This commit is contained in:
Joseph Chris 2025-01-02 04:59:39 +00:00
parent cd4f3b85fb
commit 5f7b21127f
No known key found for this signature in database
9 changed files with 21 additions and 21 deletions

View File

@ -3,11 +3,11 @@ RUN apk add --no-cache tzdata ca-certificates
FROM alpine:3.21 FROM alpine:3.21
ARG TARGETPLATFORM ARG TARGETPLATFORM
COPY bin/arch/${TARGETPLATFORM}/ai-agent-web /app/ai-agent-web COPY bin/arch/${TARGETPLATFORM}/ai-agent /app/ai-agent
COPY agents /app/agents COPY agents /app/agents
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /usr/share/ca-certificates /usr/share/ca-certificates COPY --from=builder /usr/share/ca-certificates /usr/share/ca-certificates
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
WORKDIR /app WORKDIR /app
EXPOSE 7120 EXPOSE 7120
CMD ["/app/ai-agent-web"] CMD ["/app/ai-agent"]

View File

@ -2,8 +2,8 @@
AGENTS_DIR = agents AGENTS_DIR = agents
DIST_DIRECTORY = ./bin DIST_DIRECTORY = ./bin
DIST_APPNAME = ai-agent DIST_APPNAME = ai-agent
DIST_EXENAME = ai-agent-web DIST_EXENAME = ai-agent
BUILDINFO_CLASS = codelab/ai-agent/internal/conf BUILDINFO_CLASS = github.com/ltylab/ai-agent/internal/conf
BUILDINFO_VERSION := $(shell git describe --tags 2>/dev/null || echo "git/$(shell git rev-parse --short HEAD 2>/dev/null || echo 'none')") BUILDINFO_VERSION := $(shell git describe --tags 2>/dev/null || echo "git/$(shell git rev-parse --short HEAD 2>/dev/null || echo 'none')")
CROSS_BUILD_TRIPLES = darwin/amd64 \ CROSS_BUILD_TRIPLES = darwin/amd64 \
darwin/arm64 \ darwin/arm64 \

View File

@ -1,4 +1,4 @@
# Luo Tianyi CodeLab AI Agent # Luo Tianyi Codelabs AI Agent
提供类似 QQ 界面的公共 AI 聊天机器人,基于 Google Gemini 模型。 提供类似 QQ 界面的公共 AI 聊天机器人,基于 Google Gemini 模型。
@ -22,14 +22,14 @@ export GOOGLE_AI_KEY=your-key
您也可以使用 Docker 运行: 您也可以使用 Docker 运行:
```bash ```bash
docker run -d -p 57120:7120 -e GOOGLE_AI_KEY=your-key \ docker run -d -p 57120:7120 -e GOOGLE_AI_KEY=your-key \
--name ai-agent-web ghcr.io/ltylab/codelab-ai-agent --name ai-agent-web ghcr.io/github.com/ltylab/ai-agent
``` ```
如果需要自定义 AI Agent请将您的 AI Agent 配置文件映射到 `/app/agents` 目录: 如果需要自定义 AI Agent请将您的 AI Agent 配置文件映射到 `/app/agents` 目录:
```bash ```bash
docker run -d -p 57120:7120 -e GOOGLE_AI_KEY=your-key \ docker run -d -p 57120:7120 -e GOOGLE_AI_KEY=your-key \
-v /path/to/your/agents:/app/agents \ -v /path/to/your/agents:/app/agents \
--name ai-agent-web ghcr.io/ltylab/codelab-ai-agent --name ai-agent-web ghcr.io/github.com/ltylab/ai-agent
``` ```
可以通过 `-model` 参数修改模型,推荐使用下面两个免费模型: 可以通过 `-model` 参数修改模型,推荐使用下面两个免费模型:

2
go.mod
View File

@ -1,4 +1,4 @@
module codelab/ai-agent module github.com/ltylab/ai-agent
go 1.23.3 go 1.23.3

View File

@ -7,9 +7,9 @@ import (
"path" "path"
"regexp" "regexp"
"codelab/ai-agent/internal/conf" "github.com/ltylab/ai-agent/internal/conf"
"codelab/ai-agent/internal/log" "github.com/ltylab/ai-agent/internal/log"
"codelab/ai-agent/web/assets" "github.com/ltylab/ai-agent/web/assets"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@ -5,7 +5,7 @@ var (
BuildTime = "<unknown>" BuildTime = "<unknown>"
BuildMode = "development" BuildMode = "development"
PackageLicense = "Unlicense" PackageLicense = "Unlicense"
PackageCopyright = "This is an unlicensed software (under public domain) by Luo's CodeLabs <lty.name>." PackageCopyright = "This is an unlicensed software (under public domain) by Luo Tianyi Codelabs <https://lty.name/>."
DefaultListen = ":7120" DefaultListen = ":7120"
DefaultAgentsDir = "agents" DefaultAgentsDir = "agents"

View File

@ -8,8 +8,8 @@ import (
"path" "path"
"time" "time"
"codelab/ai-agent/internal/agent" "github.com/ltylab/ai-agent/internal/agent"
"codelab/ai-agent/internal/log" "github.com/ltylab/ai-agent/internal/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/generative-ai-go/genai" "github.com/google/generative-ai-go/genai"

View File

@ -6,10 +6,10 @@ import (
"net/http" "net/http"
"os" "os"
"codelab/ai-agent/internal/agent" "github.com/ltylab/ai-agent/internal/agent"
"codelab/ai-agent/internal/log" "github.com/ltylab/ai-agent/internal/log"
"codelab/ai-agent/web" "github.com/ltylab/ai-agent/web"
"codelab/ai-agent/web/assets" "github.com/ltylab/ai-agent/web/assets"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@ -4,9 +4,9 @@ import (
"flag" "flag"
"os" "os"
"codelab/ai-agent/internal/conf" "github.com/ltylab/ai-agent/internal/conf"
"codelab/ai-agent/internal/log" "github.com/ltylab/ai-agent/internal/log"
"codelab/ai-agent/internal/server" "github.com/ltylab/ai-agent/internal/server"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )