集成Yi模型
name: 集成Yi模型 about: Create a pull request
Description
你好👋,我在你们的model里面集成了Yi模型,修改了init文件
Checklist
Please check the following items before code is ready to be reviewed.
- [x] Code has passed all tests
- [x] Code is ready for review
Please execute pre-commit run --all-files to reformat the code
谢谢我已经根据要求修改了相关格式和代码,可以继续接下的工作了
Hi @DavdGao, could you please help me review this?
Hi @DavdGao, could you please help me review this?
Thanks for your contribution. We will give feedback as soon as possible.
Please complete the following section:
- Add model_config_template to show how to use Yi Model.
- Add UnitTest
I've updated the code according to the rules, thank you @DavdGao @zhijianma. I'm unsure about the best place to put the demo and UnitTest. Would you mind advising where they should go?
I've updated the code according to the rules, thank you @DavdGao @zhijianma. I'm unsure about the best place to put the demo and UnitTest. Would you mind advising where they should go?
You can refer to https://github.com/modelscope/agentscope/pull/181/files to review the required changes. Demo, unitTest and documents are required.
@Haijian06
Please review and improve your code, please refer to OpenAIChatWrapper .
- Explicitly add
streamparameter in the__init__method. - Set
streamtoNoneas default value in the__call__at L116. streamis optional, please unify the methodclient.chat.completions.createin L136-L148.- Note that a streaming response does not have a
model_dumpmethod at line 157 - Update the monitor for streaming mode at line 162.
- Save a generator of content to the stream field of
ModelResponseat line 167. - Handle the content and usage of the streaming response with care.
- Complete the docstring accordingly.