use standard go mod name
Some checks failed
Build / Build (push) Has been cancelled

This commit is contained in:
Joseph Chris 2025-01-02 04:59:39 +00:00
parent cd4f3b85fb
commit f06f341d12
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
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 --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
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
WORKDIR /app
EXPOSE 7120
CMD ["/app/ai-agent-web"]
CMD ["/app/ai-agent"]

View File

@ -2,8 +2,8 @@
AGENTS_DIR = agents
DIST_DIRECTORY = ./bin
DIST_APPNAME = ai-agent
DIST_EXENAME = ai-agent-web
BUILDINFO_CLASS = codelab/ai-agent/internal/conf
DIST_EXENAME = ai-agent
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')")
CROSS_BUILD_TRIPLES = darwin/amd64 \
darwin/arm64 \

View File

@ -1,4 +1,4 @@
# Luo Tianyi CodeLab AI Agent
# Luo Tianyi Codelabs AI Agent
提供类似 QQ 界面的公共 AI 聊天机器人,基于 Google Gemini 模型。
@ -22,14 +22,14 @@ export GOOGLE_AI_KEY=your-key
您也可以使用 Docker 运行:
```bash
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` 目录:
```bash
docker run -d -p 57120:7120 -e GOOGLE_AI_KEY=your-key \
-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` 参数修改模型,推荐使用下面两个免费模型:

2
go.mod
View File

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

View File

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

View File

@ -5,7 +5,7 @@ var (
BuildTime = "<unknown>"
BuildMode = "development"
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"
DefaultAgentsDir = "agents"

View File

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

View File

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

View File

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