FastChat
FastChat copied to clipboard
Update model_chatglm.py
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.shto 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).