Report OpenAI Error when call AzureOpenAI service
opened this issue · comments
under debug model
[Request] OpenAI Error: {'id': '', 'choices': [], 'created': 0, 'model': '', 'object': '', 'system_fingerprint': None, 'usage': None, 'prompt_filter_results': [{'prompt_index': 0, 'content_filter_results': {'hate': {'filtered': False, 'severity': 'safe'}, 'self_harm': {'filtered': False, 'severity': 'safe'}, 'sexual': {'filtered': False, 'severity': 'safe'}, 'violence': {'filtered': False, 'severity': 'safe'}}}]}
This is a confirmed bug caused by Agently OpenAI response message handling methods.
In current handling logic, we try to find first item in choices
from response message and if we can not find any, we assume this message is an error message.
But when requesting AzureOpenAI, this kind of messages are normal response messages sent when requests are complete.
We will fix this bug in next version.
We made some changes in Maplemx/Agently@0835e21
But we did not remove this message, instead, we just change the tips of the message from 'Error' to 'Server Response Message' for these reasons down below:
- This message can only be displayed in debug mode and in debug mode we should let developers know more information from model server. When model server try to send a message to developer, it may contain something that model server want developer to know.
- The former tips about this message was 'Error', this expression was incorrect and will make developers feel worried. The correct expression should be 'Server Response Message'.
published in version 3.3.1.2