change searchqna prompt (#639)
* change prompt * debug * debug --------- Co-authored-by: chen, suyue <suyue.chen@intel.com>
This commit is contained in:
@@ -36,10 +36,10 @@ function validate_searchqa() {
|
||||
export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
|
||||
echo "$CLIENT_POD"
|
||||
accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='searchqa')].status.accessUrl}")
|
||||
kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -X POST -d '{"text":"What is the latest news? Give me also the source link."}' -H 'Content-Type: application/json' > $LOG_PATH/gmc_searchqa.log
|
||||
kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -X POST -d '{"text":"How many gold medals does USA win in olympics 2024? Give me also the source link."}' -H 'Content-Type: application/json' > $LOG_PATH/gmc_searchqa.log
|
||||
exit_code=$?
|
||||
if [ $exit_code -ne 0 ]; then
|
||||
echo "chatqna failed, please check the logs in ${LOG_PATH}!"
|
||||
echo "searchqna failed, please check the logs in ${LOG_PATH}!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ function validate_searchqa() {
|
||||
export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
|
||||
echo "$CLIENT_POD"
|
||||
accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='searchqa')].status.accessUrl}")
|
||||
kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -X POST -d '{"text":"What is the latest news? Give me also the source link."}' -H 'Content-Type: application/json' > $LOG_PATH/gmc_searchqa.log
|
||||
kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -X POST -d '{"text":"How many gold medals does USA win in olympics 2024? Give me also the source link."}' -H 'Content-Type: application/json' > $LOG_PATH/gmc_searchqa.log
|
||||
exit_code=$?
|
||||
if [ $exit_code -ne 0 ]; then
|
||||
echo "chatqna failed, please check the logs in ${LOG_PATH}!"
|
||||
echo "searchqna failed, please check the logs in ${LOG_PATH}!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -73,10 +73,14 @@ function start_services() {
|
||||
|
||||
|
||||
function validate_megaservice() {
|
||||
result=$(http_proxy="" curl http://${ip_address}:3008/v1/searchqna -XPOST -d '{"messages": "What is the latest news? Give me also the source link", "stream": "False"}' -H 'Content-Type: application/json')
|
||||
result=$(http_proxy="" curl http://${ip_address}:3008/v1/searchqna -XPOST -d '{"messages": "How many gold medals does USA win in olympics 2024? Give me also the source link.", "stream": "False"}' -H 'Content-Type: application/json')
|
||||
echo $result
|
||||
|
||||
if [[ $result == *"news"* ]]; then
|
||||
if [[ $result == *"2024"* ]]; then
|
||||
docker logs web-retriever-chroma-server > ${LOG_PATH}/web-retriever-chroma-server.log
|
||||
docker logs searchqna-gaudi-backend-server > ${LOG_PATH}/searchqna-gaudi-backend-server.log
|
||||
docker logs tei-embedding-gaudi-server > ${LOG_PATH}/tei-embedding-gaudi-server.log
|
||||
docker logs embedding-tei-server > ${LOG_PATH}/embedding-tei-server.log
|
||||
echo "Result correct."
|
||||
else
|
||||
docker logs web-retriever-chroma-server > ${LOG_PATH}/web-retriever-chroma-server.log
|
||||
|
||||
@@ -71,10 +71,12 @@ function start_services() {
|
||||
|
||||
|
||||
function validate_megaservice() {
|
||||
result=$(http_proxy="" curl http://${ip_address}:3008/v1/searchqna -XPOST -d '{"messages": "What is the latest news? Give me also the source link", "stream": "False"}' -H 'Content-Type: application/json')
|
||||
result=$(http_proxy="" curl http://${ip_address}:3008/v1/searchqna -XPOST -d '{"messages": "How many gold medals does USA win in olympics 2024? Give me also the source link.", "stream": "False"}' -H 'Content-Type: application/json')
|
||||
echo $result
|
||||
|
||||
if [[ $result == *"news"* ]]; then
|
||||
if [[ $result == *"2024"* ]]; then
|
||||
docker logs web-retriever-chroma-server
|
||||
docker logs searchqna-xeon-backend-server
|
||||
echo "Result correct."
|
||||
else
|
||||
docker logs web-retriever-chroma-server
|
||||
|
||||
Reference in New Issue
Block a user