Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] Refactor Lagent #97

Merged
merged 24 commits into from
Jan 30, 2024
Merged

[Refactor] Refactor Lagent #97

merged 24 commits into from
Jan 30, 2024

Conversation

Harold-lkk
Copy link
Member

@Harold-lkk Harold-lkk commented Jan 25, 2024

  • We have unified the interfaces of our models, including the functions generate, chat, stream_generate, tokenize.
  • To enhance flexibility and efficiency, Action is now compatible with Toolkit. Multiple methods within the same class can now be automatically transformed into multiple tools, and the returned descriptions can seamlessly integrate into OpenAI's function calls.
  • The interface of the Agent has been optimized to closely resemble that of the Model, enabling a seamless transition between models and intelligent agent

Harold-lkk and others added 24 commits September 23, 2023 00:47
* redesign BaseModel

* update docstring

* update baseModel
* [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 <[email protected]>
Co-authored-by: wangzy <[email protected]>
* add new tools

* update PPT

* chores

* update action module init

---------

Co-authored-by: wangzy <[email protected]>
* implement `chat`

* update agent interfaces

* redundancy reduction

---------

Co-authored-by: wangzy <[email protected]>
* [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 <[email protected]>
fix APITemplateParser object is not callable

Co-authored-by: wangzy <[email protected]>
* [Feat] support StreamAgent

* update `StreamAgent`

* truncate inner history

---------

Co-authored-by: wangzy <[email protected]>
* Feature: huggingface implemented BaseMode

* hf llm implemented BaseMode

* fix bug of hf llm

* inject attention_mask during inference

* remove unnecessary
* redundancy reduction

* add `tool_api` to annotate a tool method

* improve json parsing

* enhance parsers

* update README.md

---------

Co-authored-by: wangzy <[email protected]>
improve `tool_api`

Co-authored-by: wangzy <[email protected]>
init the docs

Co-authored-by: wangzy <[email protected]>
* modify the struction of action results

* fix docstrings

---------

Co-authored-by: wangzy <[email protected]>
fix rtd config

Co-authored-by: wangzy <[email protected]>
* add ipython interpreter

* update requirements

* remove `return_list` argument

---------

Co-authored-by: wangzy <[email protected]>
fix the fallback value

Co-authored-by: wangzy <[email protected]>
* 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 <[email protected]>
* add `get_started` chapter

* fix docstrings

* add action.md

* add zh docs

---------

Co-authored-by: wangzy <[email protected]>
fix `BaseAPIModel` chat returns

Co-authored-by: wangzy <[email protected]>
* add warn for func 'generate_from_template'

* clearer alerts for deprecation

* clearer alerts for deprecation
@Harold-lkk Harold-lkk changed the title [Version] 0.2.0 [Refactor] Refactor Lagent Jan 30, 2024
@Harold-lkk Harold-lkk merged commit 95b68c8 into main Jan 30, 2024
1 check passed
@Harold-lkk Harold-lkk deleted the dev branch July 11, 2024 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants