agentscope icon indicating copy to clipboard operation
agentscope copied to clipboard

集成Yi模型

Open Haijian06 opened this issue 1 year ago • 8 comments


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

Haijian06 avatar Jul 16 '24 05:07 Haijian06

Please execute pre-commit run --all-files to reformat the code

DavdGao avatar Jul 17 '24 06:07 DavdGao

谢谢我已经根据要求修改了相关格式和代码,可以继续接下的工作了

Haijian06 avatar Jul 18 '24 08:07 Haijian06

Hi @DavdGao, could you please help me review this?

Haijian06 avatar Jul 30 '24 02:07 Haijian06

Hi @DavdGao, could you please help me review this?

Thanks for your contribution. We will give feedback as soon as possible.

DavdGao avatar Jul 30 '24 03:07 DavdGao

Please complete the following section:

  • Add model_config_template to show how to use Yi Model.
  • Add UnitTest

zhijianma avatar Jul 30 '24 05:07 zhijianma

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?

Haijian06 avatar Jul 30 '24 06:07 Haijian06

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.

garyzhang99 avatar Jul 30 '24 07:07 garyzhang99

@Haijian06

Please review and improve your code, please refer to OpenAIChatWrapper .

  • Explicitly add stream parameter in the __init__ method.
  • Set stream to None as default value in the __call__ at L116.
  • stream is optional, please unify the method client.chat.completions.create in L136-L148.
  • Note that a streaming response does not have a model_dump method at line 157
  • Update the monitor for streaming mode at line 162.
  • Save a generator of content to the stream field of ModelResponse at line 167.
  • Handle the content and usage of the streaming response with care.
  • Complete the docstring accordingly.

zhijianma avatar Jul 31 '24 01:07 zhijianma