Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
  • Loading branch information
Abirdcfly committed Mar 22, 2024
1 parent f934aa0 commit e56ddde
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion tests/example-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,31 @@ waitCRDStatusReady "Application" "arcadia" "base-chat-english-teacher"
EnableAPIServerPortForward
sleep 3
getRespInAppChat "base-chat-english-teacher" "arcadia" "hi how are you?" "" "true"

info "8.4.5 get app prompt starters"
attempt=0
while true; do
info "sleep 3 seconds"
sleep 3
info "get app prompt starters without knowledgebase"
resp=$(curl --max-time $TimeoutSeconds -s --show-error -XPOST http://127.0.0.1:8081/chat/prompt-starter --data '{"app_name": "base-chat-english-teacher"}' -H 'namespace: arcadia')
echo $resp | jq .
if [[ $resp == *"error"* ]]; then
attempt=$((attempt + 1))
if [ $attempt -gt $RETRY_COUNT ]; then
echo "❌: Failed. Retry count exceeded."
exit 1
fi
echo "🔄: Failed. Attempt $attempt/$RETRY_COUNT"
kill $portal_pid >/dev/null 2>&1
EnableAPIServerPortForward
if [[ $resp == *"googleapi: Error"* ]]; then
echo "google api error, will retry after 60s"
sleep 60
fi
continue
fi
done
exit 0
info "8.2 QA app using knowledgebase base"
info "8.2.1.1 QA app using knowledgebase base on chroma"
kubectl apply -f config/samples/app_retrievalqachain_knowledgebase.yaml
Expand Down

0 comments on commit e56ddde

Please sign in to comment.