Refa: shorten the code so that Resonse generates the appropriate header
shorten the code so that Resonse generates the appropriate header on its own.
Testing
- [x] Refactoring
Hi @yongtenglei , @KevinHuSh I've added more support for the agent, from now on. We can agree on a common template that does not e.g. function pass into the parameter. to come up with the format of open AI
agent testing
no stream
stream
CI failure. Please fully test it.
please check again
Hi, thanks for your contribution. Here are three things:
-
Stream Mode Behavior In stream mode, the response should be delivered incrementally. Currently, the behavior seems to be "previous response + incremental content." This needs to be adjusted to ensure that each chunk of data is sent incrementally, without re-sending the previous response.
-
Parameter Input Issue I encountered a
TypeError ("get_data_openai() got an unexpected keyword argument 'messages'")while testing theopenai/<chat_id>/<share=chat>/chat/completionsinnon-streamingmode. Please ensure that the parameters being passed are correctly aligned with the your API specifications. -
API Testing and Documentation It is important to thoroughly test your APIs before request PR. Additionally, providing detailed documentation on how each API works and how to use it correctly would greatly reduce the chances of misunderstandings and incorrect code development. This will ensure smoother code review and integration for us :)