Generative AI Examples is a collection of GenAI examples such as ChatQnA, Copilot, which illustrate the pipeline capabilities of the Open Platform for Enterprise AI (OPEA) project.
The above command does not work, gives an error `{"detail":[{"type":"json_invalid","loc":["body",59],"msg":"JSON decode error","input":{},"ctx":{"error":"Expecting value"}}]}'
The correct format of the command should be as below.
curl http://${host_ip}:7000/v1/retrieval \
-X POST \
-d '{"text":"What is the revenue of Nike in 2023?","embedding":"'"${your_embedding}"'"}' \
-H 'Content-Type: application/json'
You are expected to replace the ${your_embedding} with the actual value printed from the above code snippet in the readme. Basically it's 768 dimension 1-d array.
In the Readme.md at https://github.com/opea-project/GenAIExamples/tree/main/ChatQnA/microservice/xeon, there is a Retriever Microservice curl command, the command given is: curl http://${host_ip}:7000/v1/retrieval\ -X POST \ -d '{"text":"What is the revenue of Nike in 2023?","embedding":${your_embedding}}' \ -H 'Content-Type: application/json'
The above command does not work, gives an error `{"detail":[{"type":"json_invalid","loc":["body",59],"msg":"JSON decode error","input":{},"ctx":{"error":"Expecting value"}}]}'
The correct format of the command should be as below. curl http://${host_ip}:7000/v1/retrieval \ -X POST \ -d '{"text":"What is the revenue of Nike in 2023?","embedding":"'"${your_embedding}"'"}' \ -H 'Content-Type: application/json'