I'm trying to consume the OpenAI GPT-4 Chat Consumption API (there is no plugin in Forge for it now):
https://api.openai.com/v1/chat/completions
When I create the REST call, a new type is created:
I want to assign a new element since I need to pass a JSON like this:
{ "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "User message goes here." }
When I try to assign a value and create a temp variable:
I cannot find a way to assign the value:
I actually would like to assign both values at once, the role and the content, but I cannot find a way to do it. I tried something like new MessageItem() { Role = "System", Content = "Message 1" }, but it also failed. Any idea what am I doing wrong? Or how should I assign them? Thanks.
Hello,
You have to assign values to your structure attributes separately. In your case, it would look something like this: