Trying to develop a CustomerSupport-ChatBot with ChatGPTs API
0
Hey everyone, I'm getting really depressed right now. I'm trying to set up a ChatBot in Mendix for my bachelor's thesis, and I'm completely new to Mendix. However, my professor wants me to do it in Mendix since it's a low-code platform. I think I'm really close to finishing it, but something is wrong, and I can't figure out what the problem is. For context, if I try to send a message via a message field, nothing actually gets posted into my message entity when I create it in the microflow. But even if I hard-code everything necessary for the prompt to work, nothing gets sent back. I don't know why. I've provided some pictures—hopefully, they can help you understand my problem. The REST call activity is or should be configured properly since I don't receive any error logs from it. Domain Model: Microflow Export Mapping Import Mapping JSON Request { "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "Du bist ein freundlicher Support-Mitarbeiter. Beantworte klar und präzise Kundenfragen." }, { "role": "user", "content": "Wie kann ich ein Rücksendeetikett erstellen?" } ], "max_tokens": 150, "temperature": 0.5} JSON Response { "id": "cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7", "choices": [ { "text": "\n\nThis is indeed a test", "finish_reason": "length" } ]} Lovely greetings from Germany, Steffen PS: It would mean the world to me if someone could help me with this <3
asked
Steffen Becker
2 answers
1
Hi Steffen,
the JSON Response shows "choices", in the screenshots I see the entity is called "Choice".
I would add a JSON structure in Mendix (based on the response) and use that as my import mapping structure. The import now doesn't generate the "Choice" entity, because it expects "choices".
answered
Roy Veenvliet
1
Hi Steffen,
If you're new to Mendix, I recommend using the ChatGPT3 module available in the Marketplace. It's straightforward to understand and easy to configure. You only need to provide the API key during the setup process.