Hey Team, Im facing one issue I created nl models ...
# community-help
s
Hey Team, Im facing one issue I created nl models referring to this: https://typesense.org/docs/29.0/api/natural-language-search.html#natural-language-search but when i try to search using the model _id im getting this
Copy code
"parsed_nl_query": {
        "augmented_params": {
            "q": "show me red shirts under 50",
            "sort_by": ""
        },
        "error": "Error getting natural language search model: Model not found",
        "generated_params": {}
    },
a
Hey @Sai Prasanth Could you share how you set it up? You'll want to make sure you are using one of these models: https://typesense.org/docs/29.0/api/natural-language-search.html#supported-model-types
s
yes this is my curl
Copy code
curl --location '<http://localhost:8108/nl_search_models>' \
--header 'X-TYPESENSE-API-KEY: 1234' \
--header 'Content-Type: application/json' \
--data '{
            "id": "openai-model",
            "model_name": "openai/gpt-4.1",
            "api_key":"",
            "max_bytes": 16000,
            "temperature": 0.0,
            "system_prompt": "prompt"
          }'
f
This is a GET request (default HTTP method of curl). You need to use a POST method
s
the one mentioned here is POST https://typesense.org/docs/29.0/api/natural-language-search.html#create-a-natural-language-search-model ? if so then i imported the same curl itself
@Fanis Tharropoulos
a
@Sai Prasanth Your curl is missing the '-X POST' part
s
Thanks , it worked. Just a suggestion in the doc i feel you should be mentioning it as POST, its actually not present.