API Behaving Differently in Different Apps, same setup

Been banging my head against this problem for a bit:

I’m using the API connector to create a thread in OpenAI. I built all this out in a test application before moving it to my actual application (yes this is a completely separate test app, not a dev branch). I copied all the settings exactly, and I’m passing the same exact information, but in my actual app the information isn’t coming through. Here’s what I’m talking about:

Test app:

Main app:

When I use Create Thread in my test app vs my main app, it’s identical as well:

Test app:

Main app:

In the test app, everything happens as intended. In the main app the API call is made successfully - a thread is created and it has all the static pieces of the instructions field, but it includes non of the dynamic test, like “Parent group’s ProdManComp’s Schedule File’s file name” and so on.

Of course at first I thought that the group’s ProdManComp wasn’t set or something like that, so I added this set state before the Create Thread that has the exact same input:

And when I run it then look at the ‘progress’ custom state, it shows what I want:

On top of that, I’ve set a breakpoint at Create Thread and checked the input, and it’s not missing anything - you can see it has the filename, and list fields, etc:

I know those things are missing because I can do into OpenAI’s interface and see the thread doesn’t have that info.

I’m not sure where to go from here, it looks like everything should be working and I have no idea why it’s not. I’d appreciate any help. Thanks!

Try removing these commas and use the :JSON safe operator to send your instructions

Apply same approach in any other part where json may be breaking

1 Like

Thanks, I don’t think that’s the issue since the same exact code is working on my test app. I did change it and test just in case, but I’m getting the same issue with the info not coming through.

Put your json through a JSON formatter tool to ensure that all is good.

I had done that originally, and again the exact same setup is working in the test app so I’d be surprised if it were the JSON. Just in case, I just reverified that it works in the JSON validator (though of course I have to put in dummy values for instructions and file_id).

Any other ideas what might be causing this?

Check privacy rules

Hmmm, when I read your last response I thought “Ah, privacy rules, I bet that’s it!” but when I went and checked, I don’t see anything that I would change; do you?

There may be dB differences between dev and live

Also, do not assume that data is being passed … check what is being passed … it seems that you are running this in the front end … so console log it