AgentEra / Agently

[GenAI Application Development Framework] 🚀 Build GenAI application quick and easy 💬 Easy to interact with GenAI agent in code using structure data and chained-calls syntax 🧩 Use Event-Driven Flow *TriggerFlow* to manage complex GenAI working logic 🔀 Switch to any model without rewrite application code

Home Page:http://agently.tech

Repository from Github https://github.comAgentEra/AgentlyRepository from Github https://github.comAgentEra/Agently

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:

  1. 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.
  2. 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