Initial commit: CarrotAssistant backend (Go + Gin + SQLite, OpenAI-compatible agent runtime)

This commit is contained in:
2026-07-06 16:10:55 +08:00
commit 5f84739b18
40 changed files with 4781 additions and 0 deletions

12
internal/server/uuid.go Normal file
View File

@@ -0,0 +1,12 @@
package server
import "github.com/google/uuid"
// newUUID generates a v4 UUID string for session IDs.
func newUUID() (string, error) {
u, err := uuid.NewRandom()
if err != nil {
return "", err
}
return u.String(), nil
}