Add chat-memory module: MessageWindowChatMemory, JDBC and Redis repositories, per-user conversation IDs
Real PostgreSQL 16 and Redis Stack 7.4; 24 tests write output/01-24. Covers the 20-message default window with no property, the 36-character conversation_id, tool messages dropped by JdbcChatMemoryRepository, concurrent add() on one conversation, a 1.x table under the 2.0 repository, the Redis repository silently backing off for a custom ChatMemory, and the removal of PromptChatMemoryAdvisor. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ja4jkzrbQ4LQZBNrb5mkZE
This commit is contained in:
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
# Compiles src/broken/PromptAdvisorFrom1x.java against the 2.0.1 classpath, then against the
|
||||
# 1.1.8 spring-ai-client-chat + spring-ai-model jars, and writes both compiler results to
|
||||
# output/23-prompt-advisor-removed.txt. Needs the module built once online (mvn -q test-compile).
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
OUT=output/23-prompt-advisor-removed.txt
|
||||
mvn -q -B dependency:build-classpath -Dmdep.outputFile=target/classpath.txt >/dev/null 2>&1
|
||||
CP2="$(cat target/classpath.txt)"
|
||||
WORK="$(mktemp -d)"
|
||||
for a in spring-ai-client-chat spring-ai-model; do
|
||||
# Maven Central occasionally answers 429/5xx to a burst of requests: retry with a pause.
|
||||
for attempt in 1 2 3 4 5; do
|
||||
curl -sfL -o "$WORK/$a-1.1.8.jar" "https://repo1.maven.org/maven2/org/springframework/ai/$a/1.1.8/$a-1.1.8.jar" && break
|
||||
sleep $((attempt * 3))
|
||||
done
|
||||
done
|
||||
CP1="$WORK/spring-ai-client-chat-1.1.8.jar:$WORK/spring-ai-model-1.1.8.jar:$CP2"
|
||||
# put the 1.1.8 jars FIRST so their classes win over the 2.0.1 ones on the classpath
|
||||
{
|
||||
echo "# PromptChatMemoryAdvisor: Spring AI 1.1.8 vs 2.0.1"
|
||||
echo
|
||||
echo "\$ javac PromptAdvisorFrom1x.java # classpath: spring-ai-client-chat 2.0.1"
|
||||
javac -proc:none -d "$WORK/out2" -cp "$CP2" src/broken/PromptAdvisorFrom1x.java 2>&1 | grep -v JAVA_TOOL | sed "s#src/broken/##" || true
|
||||
echo
|
||||
echo "\$ javac PromptAdvisorFrom1x.java # classpath: spring-ai-client-chat 1.1.8 first"
|
||||
mkdir -p "$WORK/out1"
|
||||
if javac -proc:none -d "$WORK/out1" -cp "$CP1" src/broken/PromptAdvisorFrom1x.java 2>&1 | grep -v JAVA_TOOL | sed "s#src/broken/##"; then :; fi
|
||||
ls "$WORK/out1" | sed 's/^/compiled: /'
|
||||
} > "$OUT"
|
||||
cat "$OUT"
|
||||
Reference in New Issue
Block a user