Procházet zdrojové kódy

build: Update google-generativeai version to 0.8.5

This change upgrades the google-generativeai library to version
0.8.5 in the Dockerfile.  This ensures compatibility with newer
features and bug fixes in the library.  It also updates the
AI-Rebase version and Gemini model within the related scripts.
seno před 1 měsícem
rodič
revize
89effff048
3 změnil soubory, kde provedl 10 přidání a 6 odebrání
  1. 1 1
      Dockerfile
  2. 1 1
      Makefile
  3. 8 4
      ai-rebase.sh

+ 1 - 1
Dockerfile

@@ -14,7 +14,7 @@ ENV HOME=/home/appuser
 RUN groupadd -r appgroup && useradd --no-log-init -r -g appgroup -d /home/appuser -m appuser
 
 # Install any necessary dependencies (in this case, just the google-generativeai library)
-RUN pip install --no-cache-dir google-generativeai
+RUN pip install --no-cache-dir google-generativeai==0.8.5
 
 # Copy the Python script into the container
 COPY git_rebase_ai.py /app/

+ 1 - 1
Makefile

@@ -3,7 +3,7 @@
 # === Variables ===
 # Override these on the command line like: make build IMAGE_TAG=2.0
 IMAGE_NAME ?= senomas/git-rebase
-IMAGE_TAG  ?= 1.0
+IMAGE_TAG  ?= 1.1
 # Full image reference used in commands
 FULL_IMAGE_NAME = $(IMAGE_NAME):$(IMAGE_TAG)
 

+ 8 - 4
ai-rebase.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 set -e
-VERSION=1.0
+VERSION=1.1
 
 echo "AI-Rebase v$VERSION"
 
@@ -18,8 +18,12 @@ fi
 if [ ! "$1" = "--delete-backups" ]; then
 	IFS='/' read -r part1 part2 <<<"$1"
 
-	echo git fetch $part1 $part2
-	git fetch $part1 $part2
+	if [ -z "$part1" ] || [ -z "$part2" ]; then
+		echo no fetch
+	else
+		echo git fetch $part1 $part2
+		git fetch $part1 $part2
+	fi
 fi
 
 docker run --rm -it \
@@ -27,6 +31,6 @@ docker run --rm -it \
 	-v "$HOME/.gitconfig:/home/appuser/.gitconfig:ro" \
 	-v "$HOME/.git-credentials:/home/appuser/.git-credentials:ro" \
 	-e GEMINI_API_KEY="$GEMINI_API_KEY" \
-	-e GEMINI_MODEL="${GEMINI_MODEL:-gemini-2.0-flash}" \
+	-e GEMINI_MODEL="${GEMINI_MODEL:-gemini-1.5-flash}" \
 	-u "$(id -u):$(id -g)" \
 	"senomas/git-rebase:$VERSION" "$@"