ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

Refa: shorten the code so that Resonse generates the appropriate header

Open isthaison opened this issue 10 months ago • 4 comments

shorten the code so that Resonse generates the appropriate header on its own.

Testing

image image

  • [x] Refactoring

isthaison avatar Feb 26 '25 10:02 isthaison

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

isthaison avatar Feb 26 '25 12:02 isthaison

agent testing no stream image stream image

isthaison avatar Feb 27 '25 03:02 isthaison

CI failure. Please fully test it.

KevinHuSh avatar Feb 27 '25 10:02 KevinHuSh

please check again

isthaison avatar Feb 28 '25 03:02 isthaison

Hi, thanks for your contribution. Here are three things:

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

  2. Parameter Input Issue I encountered a TypeError ("get_data_openai() got an unexpected keyword argument 'messages'") while testing the openai/<chat_id>/<share=chat>/chat/completions in non-streaming mode. Please ensure that the parameters being passed are correctly aligned with the your API specifications.

  3. 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 :)

yongtenglei avatar Mar 04 '25 03:03 yongtenglei