Rasa http api are not working

http://localhost:5005/model/test/intents api is giving 500 error even after providing correct model http://localhost:5005/model/test/stories is giving ZeroDivisionError: division by zero http://localhost:5005/model is giving 400 bad request error.

Please help me

Heya @Varshavm! What is your use case and what you want to archive? can you elaborate more.

Hi @nik202, thank you so much for the reply. I was able to find solutions for the first two apis.

http:localhost:5005 /test/intents

http:localhost:5005 /test/stories.

Issue: The request body that i was sending was in a wrong(json) format

Solution : Send nlu file in text/markdown format.

Now the the third one is /model is still giving error. I am using this api to load a new model.

Description: I have a deployed a kubernetes pod which can be accessed locally on 30012 port. If i am loading the model using 5005/model that is working fine, but 30012/model" is giving error - /opt/venv/lib/python3.7/site-packages/rasa/utils/common.py:351: UserWarning: No valid configuration given to load agent. Please help

@Varshavm Hi, Varsha I hope you fine? are you able to solve this issue. I am sure you had.

Hey @nik202 the /model is not working. It is saying bad request. The agent cannot be loaded even after providing the absolute path for model. Please help

@Varshavm Ok, can you please tell what you had done so far and what steps you doing for your use case goal?

Hey @nik202 , Thanks for the reply.

curl --location --request PUT ‘http://localhost:5005/model
–header ‘Content-Type: application/json’
–data-raw ‘{ “model_file”:"/home/varsha/bot/model.tar.gz" }’

I am using this to load a model- " model.tar.gz". I am providing the absolute path for the model

@Varshavm are you sure your train model is like this model.tar.gz or something like 20210904-093250.tar.gz or you can even use *.tar.gz ( Wild card).

@Varshavm is this (model.tar.gz) your train mode whilst using rasa train and saved in model folder ?

@nik202 , yes its the same model that i created using rasa train command. It was 20200806-180018.tar.gz i just renamed it to model.tar.gz

@Varshavm Its your latest model, as I can see its olde model year 2020, could you please share your rasa --version

It’s rasa 1.10.0

@Varshavm can you please update the rasa version please to latest. @Varshavm please tell me the questions which I asked.

Okay @nik202 i will update my rasa and get back to you. Thank you

@Varshavm Sure, and do share me screenshot of version while typing rasa --version in command prompt of env please.