Use case: API connector used to access Azure OPEN AI resource to create web application that allows to chat with my own data
Problem: API returns non-object that cannot be further processed in my workflow
API connector error message:
There was an issue setting up your call.
The API call returns a non-object and you picked JSON. Please check.
Error message page preview:
Error parsing data from Apiconnector2
what i have done so far:
Access/authentification checked: works finely,
Returns from “my” chatbot are fine (from what i can see in the details of the received return)
My chat with Microsoft revealed that there is no issue with the AZURE resources: the service guy showed me that he receives json formatted returns without any error codes in a troubleshooting session.
Normally, this is because you didn’t select the correct data type (top right). The server probably only return a 200 answer but no payload? Switch to empty. If this is not empty. Please share the payload returned
The returned message when i set it back to json is (error message from the actual web preview):
Error parsing data from Apiconnector2: "data: {"id":"de3c5427-ca4f-47a8-85c2-1f97f07c49c4","model":"gpt-35-turbo-16k","created":1714063535,"object":"extensions.chat.completion.chunk","choices":[{"index":0,"delta":{"context":{"messages":[{"role":"tool","content":"{\"citations\":[{\"content\":\"Title: public_sap_business_bydesign_manual_full.pdfThird-Party Order Processing — Customer Return [page 4634]\\n6.4.3.14.1.2 Sales Order Processing\\nOverview\\nThe sales order process involves creating sales orders for products or services according to specific terms\\nwith fixed conditions. The sales order is usually created by a sales employee, and can be generated out of a\\nsales quote, a sales contract, or an opportunity. The system supports pricing functionality and a check of the\\navailability of products. The cost of sales can be determined using product valuation, which enables the seller\\nto evaluate the profitability of the sales order. If services are needed to fulfill the sales order, service items\\ncan be added. …
The output does make sense so far, but the format is hindering me from processing it further.
The API doesn’t return an application/json content-type. Bubble doesn’t know what to do with this concent-type and give you an error. If you can change it in azure, do it, if not, you can always set it to “text” instead of json and use one of the JSON plugin available or regex to parse the response.