dify icon indicating copy to clipboard operation
dify copied to clipboard

fix: the object field is empty string in some openAI api compatible model

Open liuzhenghua opened this issue 10 months ago • 0 comments

Description

The object field returns by '/v1/chat/completions' API is empty string in some openAI api compatible model

Fixes # (issue)

Type of Change

Please delete options that are not relevant.

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update, included: Dify Document
  • [ ] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • [ ] Dependency upgrade

How Has This Been Tested?

choose an openAI API compatible model but the return field 'model' is empty string.

  • [ ] TODO

Suggested Checklist:

  • [ ] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] My changes generate no new warnings
  • [ ] I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • [ ] optional I have made corresponding changes to the documentation
  • [ ] optional I have added tests that prove my fix is effective or that my feature works
  • [ ] optional New and existing unit tests pass locally with my changes

liuzhenghua avatar Apr 16 '24 01:04 liuzhenghua