cancel
Showing results for 
Search instead for 
Did you mean: 

Prompt LLMs Tutorial > STEP 5 Querying the LLMs > Postman : 404

0 Kudos
669

Tutorials: https://developers-qa-blue.wcms-nonprod.c.eu-de-2.cloud.sap/tutorials/ai-core-generative-ai.html
--------------------------

In STEP 5 Querying the LLMs with Postman:

I got my deploymentUrl from the previous step.

I try a POST request to

https://api.ai.internalprod.eu-central-1.aws.ml.hana.ondemand.com/v2/inference/deployments/MY-DEPLOY....

I get a 404 Not Found response.

Same without the api-version parameter.

What is wrong?

(The Prompt Editor in the SAP AI Launchpad works fine.)

Thanks, Christian

Accepted Solutions (0)

Answers (2)

Answers (2)

lizzzcai
Associate
Associate

Hi Christian,

Did you add the resource group header as well, for example:

curl --location 'https://api.ai.internalprod.eu-central-1.aws.ml.hana.ondemand.com/v2/inference/deployments/<deploymentId>/chat/completions?api-version=2023-05-15' \
--header 'AI-Resource-Group: default' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $TOKEN" \
--data '{
  "messages": [
    {
      "role": "user",
      "content": "Words to complete this sentence?"
    }
  ]
}'
0 Kudos

Bingo!

You saved my day!

Thanks for your super quick answer.

Christian