epam / ai-dial-chat

A default UI for AI DIAL
https://chat.lab.epam.com
Apache License 2.0
44 stars 16 forks source link

It is possible to create prompt without content via API #1647

Open nartovm opened 2 weeks ago

nartovm commented 2 weeks ago

EPAM AI DIAL chat version

0.13.0-rc

What happened?

Description A bug was found that allows creation of a prompt without content through an API call

Steps to reproduce: Perform a PUT request to the following endpoint: /api/prompts/{id} Provide a request body with prompt name and description, but omit the "content" field. Observe that the request is successful, and the prompt is created without content.

Expected behavior: The API request should fail with an appropriate error message indicating that the "content" field is required for prompt creation.

Actual behavior: The API request succeeds, creating a prompt with no content.

Impact: This bug allows creation of incomplete prompts, which can lead to unexpected behavior and errors when users try to use these prompts.

Confidential information