Dynamic Components Artificial Intelligence Problem

I Made an Artificial Intelligence Application and Wanted to Add Something to Make the Chat Section Look Nice, But I Got an Error. When I Write a Message, It Should Normally Appear on the Right. The Artificial Intelligence’s Answer Is on the Left.But My Message Never Appears. The Message of Artificial Intelligence Appears. Why Why? Please Find a Solution for Me

Everytime why are you adding in vertical arrangement.?

At the very first you should use VA afterwards you should create on this id another VA. Also your code sayes text alignment of label only left or right but you should use left or right to the new VA.

It didn’t work, it didn’t work, I couldn’t do it. If I give you the .aia file, can you edit it and send it to me? Please help me. I can’t do it.

Hi Dogukan,

You set Textbox_Input.Text to "" and then used its Text.value in .SetProperty.

Move that line below instead.

The First Problem Has Been Solved, But This Time My Message Is Going But The AI’s Message Is Not Showing

Try this,

I did what you said but I encountered this error. Can you help me please? (3

Let’s suppose you’re receiving a response like this:

{
  "id": "chatcmpl-9f1234567890abc",
  "object": "chat.completion",
  "created": 1713618555,
  "model": "gpt-3.5-turbo-0125",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "ExampleText"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 13,
    "total_tokens": 25
  }
}

choices is a list with one element, containing a list of pairs (this is why I used list of pairs to dictionary pairs). These pairs are finish_reason, index, and message.

message is a dictionary with two elements: role and content.

With the blocks I’ve given you, you should be able to retrieve the content.

Did this error happen to you before as well?
Because that part of the code in my example hasn’t been modified.

Just to clarify, in my example, decoded was created as a global variable to illustrate the example.
You should use your local variable created with JSONTextDecode instead.

I did everything you said but I still get the same error please help me

read your error, it says clearly that no items are thee in the list. make sure you are getting response from the api