97 Commits

Author SHA1 Message Date
liujiangning30
581d9fb898 support demo with hf (#179) 2024-03-26 17:59:01 +08:00
RangiLyu
26672731e9 feat: support vllm (#177)
* feat: support vllm

* update requirements
2024-03-21 17:20:38 +08:00
liujiangning30
466d7aa24d Fix errmsg: cast dict to str (#172) 2024-03-20 14:27:04 +08:00
tackhwa
5f55e12736 fix typo "ablility " in overview.md (#175)
fix type "ablility " in overview.md
2024-03-20 14:26:33 +08:00
liujiangning30
e16a6bfc3a Fix bug of ppt and googlescholar (#167)
* fix bug of ppt and googlescholar

* Format required parameters
2024-03-04 13:52:06 +08:00
BraisedPork
605a921878 Fix chat return of GPTAPI (#166)
fix chat return data

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
2024-02-29 13:56:10 +08:00
liujiangning30
4fd014bebf update version (#161) v0.2.2 2024-02-23 19:50:49 +08:00
liujiangning30
432ffaae8a fix bug caused by static model_name (#156) 2024-02-21 14:47:40 +08:00
liukuikun
a64aa599ce fix batch generate (#158) 2024-02-20 15:11:42 +08:00
liujiangning30
662011783e Feat: no_skip_speicial_token (#148)
* Feat: no_skip_speicial_token

* fix: get_logger of lmdeploy

* update lmdeploy requirement
2024-02-19 16:33:13 +08:00
loveSnowBest
3cf20f5011 support inference for pad_token & chatglm chat (#157)
* update code for chatglm

* update code

* handle batch infer for chat

* update warning for cases
2024-02-19 15:54:48 +08:00
liujiangning30
7b71988d09 max_tokens to max_new_tokens (#149)
* Fix: max_new_tokens to max_tokens

* change `max_tokens` to `max_new_tokens` in API models

* max_tokens to max_new_tokens

* inject parameter 'max_new_tokens' for examples

---------

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
2024-02-06 12:08:53 +08:00
liujiangning30
90ef5215b6 Fix: gen_config in lmdeploypipeline updated by input gen_params (#151) 2024-02-05 15:53:08 +08:00
liujiangning30
6a5447663a Fix: filter_suffix in TritonClient (#150) 2024-02-04 17:36:52 +08:00
liujiangning30
a2c23ef9dd Fix: skip start_token (#145) 2024-02-02 16:09:46 +08:00
liukuikun
3be9ec042c [Enchance] lazy import for actions (#146) 2024-02-02 15:44:27 +08:00
BraisedPork
aa5a357a34 Fix type annotation (#144)
fix type annotation

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
2024-02-02 11:19:45 +08:00
liukuikun
5650a75f3e update readme demo (#143) 2024-02-01 23:09:47 +08:00
liujiangning30
eea6e1cb56 fix bug of TritonClient (#141) 2024-02-01 20:40:37 +08:00
liujiangning30
42c6d265e1 Fix bug of LMDeployClient (#140)
* Fix bug of LMDeployClient

* fix bug of web_demo
2024-02-01 17:58:10 +08:00
BraisedPork
e20a768066 [Version] Bump v0.2.1 (#139)
bump v0.2.1

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
v0.2.1
2024-02-01 13:14:26 +08:00
BraisedPork
60244a253a Fix docstring format of GoogleScholar (#138)
* fix docstrings

* update pre-commit-hooks

* chores

---------

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
2024-02-01 13:11:07 +08:00
liukuikun
990828ceb2 [Version] Bump 0.2.0 (#136) v0.2.0 2024-01-31 21:41:35 +08:00
liujiangning30
b2e6d0ee7a Feat: support stream output in cli_demo (#137)
* Feat: support stream output in cli_demo

* support generation in cli_demo
2024-01-31 21:33:46 +08:00
liujiangning30
fda869162b Fix bug of lmdeploy.LMDeployServer (#132) 2024-01-31 21:15:57 +08:00
liujiangning30
baeed6ed88 remove exception catch in hf (#135) 2024-01-31 21:15:25 +08:00
liujiangning30
94959c16da update default prompt (#133) 2024-01-31 21:15:06 +08:00
liukuikun
d61dc03079 precommit run all (#134) 2024-01-31 21:09:19 +08:00
liujiangning30
190fb731be Feat: support stream_chat in hf (#131)
* Feat: support stream_chat in hf

* update docstring
2024-01-31 20:37:16 +08:00
BraisedPork
f887b423fa Update README files (#117)
* update README

* introduce features

* add demo

---------

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
2024-01-31 20:36:57 +08:00
liujiangning30
35331a5016 Feat: add cli_demo and del unnecessaries (#124)
* Feat: add cli_demo and del unnecessaries

* support agent_cli_demo
2024-01-31 19:24:07 +08:00
BraisedPork
5dc6fb5b3d Encapsulate IPython InteractiveShell (#128)
* add IPython Shell

* add docstrings

* fix docstrings

* add docstrings

---------

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
2024-01-31 19:13:24 +08:00
BraisedPork
7489767651 Modify parameter descriptions in parsers (#130)
switch parameter descriptions to English

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
2024-01-31 19:12:40 +08:00
BraisedPork
83437b081f Fix requirements (#129)
fix requirements

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
2024-01-31 17:51:07 +08:00
BraisedPork
3d9992182e Fix action results (#127)
fix action results

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
2024-01-31 17:50:47 +08:00
BraisedPork
ca1ab4b5ec Fix conf_py_path for zh_CN docs (#126)
fix conf_py_path

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
2024-01-31 16:20:49 +08:00
liujiangning30
f974a7bd39 Feat: support response from FinishAction (#122) 2024-01-31 16:09:14 +08:00
BraisedPork
d943becaec Modify levels of readthedocs configuration (#125)
fix readthedocs config

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
2024-01-31 15:51:04 +08:00
BraisedPork
f90010c867 Add readthedocs configuration for zh_CN (#123)
* configure readthedocs

* remove unmaintained docs

---------

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
2024-01-31 14:58:00 +08:00
liujiangning30
ae3c7c37a6 Fix bug (#121)
* rename parameter 'max_out_len' of base_api to 'max_tokens'

* fix bug of hf
2024-01-31 13:36:01 +08:00
BraisedPork
559275daf4 Fix Annotated import error (#120)
fix typing

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
2024-01-31 13:35:15 +08:00
liujiangning30
c7c46785bb Feat: strip ModelStatus from AgentState (#115)
* Feat: strip ModelStatus from AgentState

* update schema

* fix bug of modelStatus
2024-01-30 22:53:37 +08:00
liujiangning30
c9973b9558 fix bug of HFTransformer.generate (#118) 2024-01-30 22:52:43 +08:00
liujiangning30
94ba3a1a75 add docstring (#116)
* BaseLLm generate docstring
2024-01-30 19:30:40 +08:00
Sean
76a46c9a8c Update internlm2_agent.py (#114)
fix typo
2024-01-30 16:36:29 +08:00
liujiangning30
d4a71f40b5 Fix: outputs with same format (#112)
model outputs with the same format
2024-01-30 16:36:08 +08:00
BraisedPork
5581fad8ce Validate actions implement run XOR other tool APIs (#111)
Validate actions implement `run` XOR other tool APIs
2024-01-30 15:12:25 +08:00
liukuikun
95b68c821a [Refactor] Refactor Lagent (#97)
* Feature: redesign BaseModel (#80)

* redesign BaseModel

* update docstring

* update baseModel

* [Refactor] improve `Action` and `ActionExecutor` (#83)

* [Fix]: fix turbomind (#81)

fix turbomind

* add parsers

* skip ActionReturn in postprocessing

* check existence of API name

* add exception catch in action executing

* validate input arguments

* modify returned structure of `get_actions_info`

* adapt tools to the new protocol

* remove `LLMQA` action

---------

Co-authored-by: RangiLyu <lyuchqi@gmail.com>
Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* [Feature] add tools (#89)

* add new tools

* update PPT

* chores

* update action module init

---------

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* rename func 'completion' to 'generate' (#90)

* [Feature] support batch inference in API models (#91)

* implement `chat`

* update agent interfaces

* redundancy reduction

---------

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* Feature: lmdeploy_wrapper implemented BaseMode (#86)

* [Fix]: fix turbomind (#81)

fix turbomind

* Feature: lmdeploy_wrapper implemented BaseMode

* remove comments of 'llms.__init__'

* update of 'llms.__init__'

* update lmdepoly_wrapper with 'gen_params'

* add property 'state_map' in __init_ and use APIClient to stream infer_

* func 'generate' in LMDeployClient with 'APIClient'

* fix bug of TritonClient

* add docstr for LMDeployPipeline & LMDeployServer

* class LMDeployClient inherits class LMDeployServer

* LMDeployClient with BaseModel.__init__ and use field 'max_tokens' control model output

* add TODO

* move 'import mmengine' to func '_update_gen_params'

---------

Co-authored-by: RangiLyu <lyuchqi@gmail.com>

* Fix APITemplateParser object is not callable (#95)

fix APITemplateParser object is not callable

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* [Feat] support StreamAgent (#82)

* [Feat] support StreamAgent

* update `StreamAgent`

* truncate inner history

---------

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* [Feat] hf llm implemented BaseMode (#92)

* Feature: huggingface implemented BaseMode

* hf llm implemented BaseMode

* fix bug of hf llm

* inject attention_mask during inference

* remove unnecessary

* [Feature] support building tool descriptions automatically (#96)

* redundancy reduction

* add `tool_api` to annotate a tool method

* improve json parsing

* enhance parsers

* update README.md

---------

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* Enhance tool annotation (#98)

improve `tool_api`

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* [Docs] initialize the documentation (#99)

init the docs

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* Modify the structure of `ActionReturn`'s result (#102)

* modify the struction of action results

* fix docstrings

---------

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* Fix .readthedocs.yml (#104)

fix rtd config

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* [Feature] support IPython interpreter action (#103)

* add ipython interpreter

* update requirements

* remove `return_list` argument

---------

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* Fix BINGMap key (#105)

fix the fallback value

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* StreamAgent  infer demo (#106)

* update cfg & fix bug of StreamAgent

* fix bug of func 'stream_chat'

* streamlit demo with full response

* enchance stream chat

* fix bug of stream chat

* fix and file rename

* add exception catch for func 'chat'

---------

Co-authored-by: liujiangning <liujiangning@pjlab.org.cn>

* [Docs] Add action tutorials (#107)

* add `get_started` chapter

* fix docstrings

* add action.md

* add zh docs

---------

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* Fix returns of OpenAI interface (#108)

fix `BaseAPIModel` chat returns

Co-authored-by: wangzy <wangziyi@pjlab.org.cn>

* Feat: add warn for func 'generate_from_template' (#109)

* add warn for func 'generate_from_template'

* clearer alerts for deprecation

* clearer alerts for deprecation

---------

Co-authored-by: liujiangning30 <147385819+liujiangning30@users.noreply.github.com>
Co-authored-by: BraisedPork <46232992+braisedpork1964@users.noreply.github.com>
Co-authored-by: RangiLyu <lyuchqi@gmail.com>
Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
Co-authored-by: liujiangning <liujiangning@pjlab.org.cn>
2024-01-30 12:48:21 +08:00
liukuikun
85b91cc652 [Version] v0.1.3 (#110)
update version
v0.1.3
2024-01-30 11:32:56 +08:00
liujiangning30
c89729620f update ReAct example for internlm2 (#85)
* update ReAct example for internlm2

* update ReAct example for internlm2

* update base_llm

* rename file

* update readme

* update meta_template
2024-01-23 10:57:58 +08:00