FastChat icon indicating copy to clipboard operation
FastChat copied to clipboard

Update model_chatglm.py

Open dbtzy opened this issue 2 years ago • 0 comments

Why are these changes needed?

Add a 'stop' action similar to OpenAI's to halt further token generation.

Reference code: https://github.com/THUDM/ChatGLM3/blob/main/openai_api_demo/utils.py

Related issue number (if applicable)

Checks

  • [x] I've run format.sh to lint the changes in this PR.
  • [x] I've included any doc changes needed.
  • [x] I've made sure the relevant tests are passing (if applicable).

dbtzy avatar Dec 02 '23 12:12 dbtzy