Repository: antgroup/agentUniverse (language: python)

Issue:
Dev remove claude



Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3d8ab500..20210ccc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,15 @@ Note - Additional remarks regarding the version.
 ***************************************************
 
 # Version Update History
+## [0.0.7] - 2024-05-29
+### Added
+- LLM component supports multimodal parameter invocation.
+- Added LLM integration methods for Qwen, WenXin, Kimi, Baichuan, etc.
+
+### Note
+- Added a multimodal example agent, see the invocation details in `sample_standard_app.app.test.test_multimodal_agent.MultimodalAgentTest`.
+- Some code optimizations and documentation updates.
+
 ## [0.0.6] - 2024-05-15
 ### Added
 - Support for the GPT-4o model, with updates to related examples.
diff --git a/CHANGELOG_zh.md b/CHANGELOG_zh.md
index 8d0998a1..580c0772 100644
--- a/CHANGELOG_zh.md
+++ b/CHANGELOG_zh.md
@@ -24,6 +24,14 @@ Note - 对于版本的额外说明。
 ***************************************************
 
 # 版本更新记录
+## [0.0.7] - 2024-05-29
+### Added
+- LLM组件支持多模态参数调用
+- 新增通义千问、文心一言、Kimi、百川等常用LLM接入方式
+
+### Note 
+- 添加多模态样例agent调用详情见`sample_standard_app.app.test.test_multimodal_agent.MultimodalAgentTest`
+- 部分代码优化与文档更新
 
 ## [0.0.6] - 2024-05-15
 ### Added
diff --git a/README.md b/README.md
index 9b31fcd5..00549a62 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ Language version: [English](./README.md) | [中文](./README_zh.md)
 ![](https://img.shields.io/badge/framework-agentUniverse-pink)
 ![](https://img.shields.io/badge/python-3.10%2B-blue?logo=Python)
 [![](https://img.shields.io/badge/%20license-Apache--2.0-yellow)](LICENSE)
-[![Static Badge](https://img.shields.io/badge/pypi-v0.0.6-blue?logo=pypi)](https://pypi.org/project/agentUniverse/)
+[![Static Badge](https://img.shields.io/badge/pypi-v0.0.7-blue?logo=pypi)](https://pypi.org/project/agentUniverse/)
 
 ![](docs/guidebook/_picture/logo_bar.jpg)
 ****************************************
diff --git a/README_zh.md b/README_zh.md
index 84c22ab5..26534b65 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -5,7 +5,7 @@
 ![](https://img.shields.io/badge/framework-agentUniverse-pink)
 ![](https://img.shields.io/badge/python-3.10%2B-blue?logo=Python)
 [![](https://img.shields.io/badge/%20license-Apache--2.0-yellow)](LICENSE)
-[![Static Badge](https://img.shields.io/badge/pypi-v0.0.6-blue?logo=pypi)](https://pypi.org/project/agentUniverse/)
+[![Static Badge](https://img.shields.io/badge/pypi-v0.0.7-blue?logo=pypi)](https://pypi.org/project/agentUniverse/)
 
 ![](docs/guidebook/_picture/logo_bar.jpg)
 ****************************************
diff --git a/agentuniverse/agent/default/rag_agent/rag_agent.yaml b/agentuniverse/agent/default/rag_agent/rag_agent.yaml
index c7e5a902..cc1b7948 100644
--- a/agentuniverse/agent/default/rag_agent/rag_agent.yaml
+++ b/agentuniverse/agent/default/rag_agent/rag_agent.yaml
@@ -4,7 +4,7 @@ info:
 profile:
   llm_model:
     name: 'default_openai_llm'
-    model_name: 'gpt-4'
+    model_name: 'gpt-4o'
 plan:
   planner:
     name: 'rag_planner'
diff --git a/agentuniverse/agent/memory/chat_memory.py b/agentuniverse/agent/memory/chat_memory.py
index 23e939c6..4e29d158 100644
--- a/agentuniverse/agent/memory/chat_memory.py
+++ b/agentuniverse/agent/memory/chat_memory.py
@@ -70,10 +70,10 @@ def initialize_by_component_configer(self, component_configer: MemoryConfiger) -
             ChatMemory: the ChatMemory object
         """
         super().initialize_by_component_configer(component_configer)
-        if component_configer.input_key:
+        if hasattr(component_configer, 'input_key') and component_configer.input_key:
             self.input_key = component_configer.input_key
-        if component_configer.output_key:
+        if hasattr(component_configer, 'output_key') and component_configer.output_key:
             self.output_key = component_configer.output_key
-        if component_configer.prompt_version:
+        if hasattr(component_configer, 'prompt_version') and component_configer.prompt_version:
             self.prompt_version = component_configer.prompt_version
         return self
diff --git a/agentuniverse/agent/plan/planner/rag_planner/rag_planner.py b/agentuniverse/agent/plan/planner/rag_planner/rag_planner.py
index 99a3b3f2..26a19c75 100644
--- a/agentuniverse/agent/plan/planner/rag_planner/rag_planner.py
+++ b/agentuniverse/agent/plan/planner/rag_planner/rag_planner.py
@@ -43,7 +43,6 @@ def invoke(self, agent_model: AgentModel, planner_input: dict,
 
         prompt: ChatPrompt = self.handle_prompt(agent_model, planner_input)
         process_llm_token(llm, prompt.as_langchain(), agent_model.profile, planner_input)
-
         llm_chain = LLMChain(llm=llm.as_langchain(),
                              prompt=prompt.as_langchain(),
                              output_key=self.output_key, memory=memory)
diff --git a/agentuniverse/base/agentuniverse.py b/agentuniverse/base/agentuniverse.py
index d8598942..80ea5723 100644
--- a/agentuniverse/base/agentuniverse.py
+++ b/agentuniverse/base/agentuniverse.py
@@ -39,7 +39,7 @@ def __init__(self):
         self.__system_default_llm_package = ['agentuniverse.llm.default']
         self.__system_default_planner_package = ['agentuniverse.agent.plan.planner']
         self.__system_default_memory_package = ['agentuniverse.agent.memory.default']
-        self.__system_default_prompt_package = ['agentuniverse.agent', 'agentuniverse.base.prompt']
+        self.__system_default_prompt_package = ['agentuniverse.agent', 'agentuniverse.base.util']
 
     def start(self, config_path: str = None):
         """Start the agentUniverse framework."""
diff --git a/agentuniverse/base/component/component_base.py b/agentuniverse/base/component/component_base.py
index c6b3220e..bb69c41e 100644
--- a/agentuniverse/base/component/component_base.py
+++ b/agentuniverse/base/component/component_base.py
@@ -7,7 +7,7 @@
 # @FileName: component_base.py
 from abc import ABC
 
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
 
 from agentuniverse.base.component.component_enum import ComponentEnum
 from agentuniverse.base.config.application_configer.application_config_manager import ApplicationConfigManager
@@ -18,6 +18,8 @@ class ComponentBase(BaseModel):
     """The ComponentBase class, which is used to define the base class of the component."""
 
     component_type: ComponentEnum
+    # pydantic protected_namespaces config
+    model_config = ConfigDict(protected_namespaces=())
 
     def get_instance_code(self) -> str:
         """Return the full name of the component."""
diff --git a/agentuniverse/base/config/component_configer/configers/llm_configer.py b/agentuniverse/base/config/component_configer/configers/llm_configer.py
index e9a0448b..6551f189 100644
--- a/agentuniverse/base/config/component_configer/configers/llm_configer.py
+++ b/agentuniverse/base/config/component_configer/configers/llm_configer.py
@@ -25,6 +25,7 @@ def __init__(self, configer: Optional[Configer] = None):
         self.__max_retries: Optional[int] = None
         self.__streaming: Optional[bool] = None
         self.__ext_info: Optional[dict] = None
+        self.__max_context_length: Optional[int] = None
 
     @property
     def name(self) -> Optional[str]:
@@ -65,6 +66,10 @@ def streaming(self) -> Optional[bool]:
     def ext_info(self) -> Optional[dict]:
         return self.__ext_info
 
+    @property
+    def max_content_length(self) -> Optional[int]:
+        return self.__max_context_length
+
     def load(self) -> 'LLMConfiger':
         """Load the configuration by the Configer object.
         Returns:
@@ -91,6 +96,7 @@ def load_by_configer(self, configer: Configer) -> 'LLMConfiger':
             self.__max_retries = configer.value.get('max_retries')
             self.__streaming = configer.value.get('streaming')
             self.__ext_info = configer.value.get('ext_info')
+            self.__max_context_length = configer.value.get('max_context_length')
         except Exception as e:
             raise Exception(f"Failed to parse the LLM configuration: {e}")
         return self
diff --git a/agentuniverse/base/prompt/__init__.py b/agentuniverse/base/util/prompt/__init__.py
similarity index 83%
rename from agentuniverse/base/prompt/__init__.py
rename to agentuniverse/base/util/prompt/__init__.py
index 645f99e4..973efb79 100644
--- a/agentuniverse/base/prompt/__init__.py
+++ b/agentuniverse/base/util/prompt/__init__.py
@@ -1,7 +1,7 @@
 # !/usr/bin/env python3
 # -*- coding:utf-8 -*-
 
-# @Time    : 2024/4/22 21:04
+# @Time    : 2024/5/28 18:13
 # @Author  : wangchongshi
 # @Email   : wangchongshi.wcs@antgroup.com
 # @FileName: __init__.py.py
diff --git a/agentuniverse/base/prompt/combine_cn_prompt.yaml b/agentuniverse/base/util/prompt/combine_cn_prompt.yaml
similarity index 100%
rename from agentuniverse/base/prompt/combine_cn_prompt.yaml
rename to agentuniverse/base/util/prompt/combine_cn_prompt.yaml
diff --git a/agentuniverse/base/prompt/combine_en_prompt.yaml b/agentuniverse/base/util/prompt/combine_en_prompt.yaml
similarity index 100%
rename from agentuniverse/base/prompt/combine_en_prompt.yaml
rename to agentuniverse/base/util/prompt/combine_en_prompt.yaml
diff --git a/agentuniverse/base/prompt/summary_cn_prompt.yaml b/agentuniverse/base/util/prompt/summary_cn_prompt.yaml
similarity index 100%
rename from agentuniverse/base/prompt/summary_cn_prompt.yaml
rename to agentuniverse/base/util/prompt/summary_cn_prompt.yaml
diff --git a/agentuniverse/base/prompt/summary_en_prompt.yaml b/agentuniverse/base/util/prompt/summary_en_prompt.yaml
similarity index 100%
rename from agentuniverse/base/prompt/summary_en_prompt.yaml
rename to agentuniverse/base/util/prompt/summary_en_prompt.yaml
diff --git a/agentuniverse/base/util/prompt_util.py b/agentuniverse/base/util/prompt_util.py
index 8a7b999b..49a3301e 100644
--- a/agentuniverse/base/util/prompt_util.py
+++ b/agentuniverse/base/util/prompt_util.py
@@ -10,6 +10,7 @@
 from langchain.chains.summarize import load_summarize_chain
 from langchain_core.documents import Document
 
+from agentuniverse.agent.memory.enum import ChatMessageEnum
 from agentuniverse.agent.memory.message import Message
 from agentuniverse.llm.llm import LLM
 from agentuniverse.llm.llm_manager import LLMManager
@@ -120,6 +121,12 @@ def generate_chat_template(agent_prompt_model: AgentPromptModel, prompt_assemble
         if value is not None:
             message_list.append(
                 Message(type=agent_prompt_model.get_message_type(attr), content=value))
+    if message_list:
+        # Integrate the system messages and put them in the first of the message list.
+        system_messages = '\n'.join(msg.content for msg in message_list if msg.type == ChatMessageEnum.SYSTEM.value)
+        if system_messages:
+            message_list = list(filter(lambda msg: msg.type != ChatMessageEnum.SYSTEM.value, message_list))
+            message_list.insert(0, Message(type=ChatMessageEnum.SYSTEM.value, content=system_messages))
     return message_list
 
 
diff --git a/agentuniverse/llm/default/baichuan_openai_style_llm.py b/agentuniverse/llm/default/baichuan_openai_style_llm.py
new file mode 100644
index 00000000..38b58395
--- /dev/null
+++ b/agentuniverse/llm/default/baichuan_openai_style_llm.py
@@ -0,0 +1,43 @@
+# !/usr/bin/env python3
+# -*- coding:utf-8 -*-
+
+# @Time    : 2024/5/21 13:52
+# @Author  : weizjajj
+# @Email   : weizhongjie.wzj@antgroup.com
+# @FileName: baichuan_openai_style_llm.py
+
+from typing import Optional
+
+from langchain_community.chat_models import ChatBaichuan
+from langchain_core.language_models import BaseLanguageModel
+from pydantic import Field
+
+from agentuniverse.base.util.env_util import get_from_env
+from agentuniverse.llm.openai_style_llm import OpenAIStyleLLM
+
+BAICHUAN_Max_CONTEXT_LENGTH = {
+    "Baichuan2-Turbo": 8000,
+    "Baichuan2-Turbo-192k": 192000,
+    "Baichuan3-Turbo": 8000,
+    "Baichuan3-Turbo-128k": 128000,
+    "Baichuan4": 8000
+}
+
+
+class BAICHUANOpenAIStyleLLM(OpenAIStyleLLM):
+    """
+    BAICHUAN OpenAI Style LLM
+    Args:
+        api_key (Optional[str]): API key for the model. Defaults to None.
+        api_base (Optional[str]): API base URL for the model. Defaults to "https://api.openai.com/v1".
+    """
+
+    api_key: Optional[str] = Field(default_factory=lambda: get_from_env("BAICHUAN_API_KEY"))
+    api_base: Optional[str] = "https://api.baichuan-ai.com/v1"
+    proxy: Optional[str] = Field(default_factory=lambda: get_from_env("BAICHUAN_PROXY"))
+    organization: Optional[str] = Field(default_factory=lambda: get_from_env("BAICHUAN_ORGANIZATION"))
+
+    def max_context_length(self) -> int:
+        if super().max_context_length():
+            return super().max_context_length()
+        return BAICHUAN_Max_CONTEXT_LENGTH.get(self.model_name, 8000)
diff --git a/agentuniverse/llm/default/baichuan_openai_style_llm.yaml b/agentuniverse/llm/default/baichuan_openai_style_llm.yaml
new file mode 100644
index 00000000..96bfbd6b
--- /dev/null
+++ b/agentuniverse/llm/default/baichuan_openai_style_llm.yaml
@@ -0,0 +1,10 @@
+name: 'default_baichuan_llm'
+description: 'default baichuan llm with spi'
+model_name: 'Baichuan2-Turbo'
+max_tokens: 1000
+api_key_name: 'BAICHUAN_API_KEY'
+api_base_name: 'BAICHUAN_API_BASE'
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.baichuan_openai_style_llm'
+  class: 'BAICHUANOpenAIStyleLLM'
\ No newline at end of file
diff --git a/agentuniverse/llm/default/default_openai_llm.py b/agentuniverse/llm/default/default_openai_llm.py
index 4de13d34..38987727 100644
--- a/agentuniverse/llm/default/default_openai_llm.py
+++ b/agentuniverse/llm/default/default_openai_llm.py
@@ -5,18 +5,47 @@
 # @Author  : wangchongshi
 # @Email   : wangchongshi.wcs@antgroup.com
 # @FileName: default_openai_llm.py
-from typing import Any
+from typing import Any, Optional
 
+from pydantic import Field
+
+from agentuniverse.base.util.env_util import get_from_env
 from agentuniverse.llm.llm_output import LLMOutput
-from agentuniverse.llm.openai_llm import OpenAILLM
+from agentuniverse.llm.openai_style_llm import OpenAIStyleLLM
+
+
+OPENAI_MAX_CONTEXT_LENGTH = {
+    "gpt-3.5-turbo": 4096,
+    "gpt-3.5-turbo-0301": 4096,
+    "gpt-3.5-turbo-0613": 4096,
+    "gpt-3.5-turbo-16k": 16384,
+    "gpt-3.5-turbo-16k-0613": 16384,
+    "gpt-35-turbo": 4096,
+    "gpt-35-turbo-16k": 16384,
+    "gpt-3.5-turbo-1106": 16384,
+    "gpt-3.5-turbo-0125": 16384,
+    "gpt-4-0314": 8192,
+    "gpt-4": 8192,
+    "gpt-4-32k": 32768,
+    "gpt-4-32k-0613": 32768,
+    "gpt-4-0613": 8192,
+    "gpt-4-1106-preview": 128000,
+    "gpt-4-turbo": 128000,
+    "gpt-4o": 128000,
+    "gpt-4o-2024-05-13": 128000,
+}
 
 
-class DefaultOpenAILLM(OpenAILLM):
+class DefaultOpenAILLM(OpenAIStyleLLM):
     """The agentUniverse default openai llm module.
 
     LLM parameters, such as name/description/model_name/max_tokens,
     are injected into this class by the default_openai_llm.yaml configuration.
     """
+    api_key: Optional[str] = Field(default_factory=lambda: get_from_env("OPENAI_API_KEY"))
+    organization: Optional[str] = Field(default_factory=lambda: get_from_env("OPENAI_ORGANIZATION"))
+    api_base: Optional[str] = Field(default_factory=lambda: get_from_env("OPENAI_API_BASE"))
+    proxy: Optional[str] = Field(default_factory=lambda: get_from_env("OPENAI_PROXY"))
 
     def call(self, messages: list, **kwargs: Any) -> LLMOutput:
         """ The call method of the LLM.
@@ -39,3 +68,10 @@ async def acall(self, messages: list, **kwargs: Any) -> LLMOutput:
             **kwargs: Arbitrary keyword arguments.
         """
         return await super().acall(messages, **kwargs)
+
+    def max_context_length(self) -> int:
+        """Max context length.
+
+          The total length of input tokens and generated tokens is limited by the openai model's context length.
+          """
+        return OPENAI_MAX_CONTEXT_LENGTH.get(self.model_name, 4096)
diff --git a/agentuniverse/llm/default/kimi_openai_style_llm.py b/agentuniverse/llm/default/kimi_openai_style_llm.py
new file mode 100644
index 00000000..122f8175
--- /dev/null
+++ b/agentuniverse/llm/default/kimi_openai_style_llm.py
@@ -0,0 +1,47 @@
+# !/usr/bin/env python3
+# -*- coding:utf-8 -*-
+
+# @Time    : 2024/5/21 13:52
+# @Author  : weizjajj
+# @Email   : weizhongjie.wzj@antgroup.com
+# @FileName: kimi_openai_style_llm.py
+
+from typing import Optional
+
+import requests
+from pydantic import Field
+
+from agentuniverse.base.util.env_util import get_from_env
+from agentuniverse.llm.openai_style_llm import OpenAIStyleLLM
+
+KIMI_Max_CONTEXT_LENGTH = {
+    "moonshot-v1-8k": 8000,
+    "moonshot-v1-32k": 32000,
+    "moonshot-v1-128k": 128000
+}
+
+
+class KIMIOpenAIStyleLLM(OpenAIStyleLLM):
+    """
+        KIMI's OpenAI Style LLM
+        Attributes:
+            api_key (Optional[str]): The API key to use for authentication. Defaults to None.
+            api_base (Optional[str]): The base URL to use for the API. Defaults to None.
+    """
+    api_key: Optional[str] = Field(default_factory=lambda: get_from_env("KIMI_API_KEY"))
+    api_base: Optional[str] = "https://api.moonshot.cn/v1"
+    proxy: Optional[str] = Field(default_factory=lambda: get_from_env("KIMI_PROXY"))
+    organization: Optional[str] = Field(default_factory=lambda: get_from_env("KIMI_ORGANIZATION"))
+
+    def max_context_length(self) -> int:
+        if super().max_context_length():
+            return super().max_context_length()
+        return KIMI_Max_CONTEXT_LENGTH.get(self.model_name, 8000)
+
+    def get_num_tokens(self, text: str) -> int:
+        # 通过http获取token数量
+        messages = [{"role": "user", "content": text}]
+        body = {"model": self.model_name, "messages": messages}
+        headers = {'Content-Type': 'application/json', 'Authorization': f'Bearer {self.api_key}'}
+        res = requests.post(f"{self.api_base}/tokenizers/estimate-token-count", headers=headers, json=body)
+        return res.json().get('data').get('total_tokens')
diff --git a/agentuniverse/llm/default/kimi_openai_style_llm.yaml b/agentuniverse/llm/default/kimi_openai_style_llm.yaml
new file mode 100644
index 00000000..80727763
--- /dev/null
+++ b/agentuniverse/llm/default/kimi_openai_style_llm.yaml
@@ -0,0 +1,8 @@
+name: 'default_kimi_llm'
+description: 'default kimi llm with spi'
+model_name: 'moonshot-v1-8k'
+max_tokens: 1000
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.kimi_openai_style_llm'
+  class: 'KIMIOpenAIStyleLLM'
\ No newline at end of file
diff --git a/agentuniverse/llm/default/qwen_openai_style_llm.py b/agentuniverse/llm/default/qwen_openai_style_llm.py
new file mode 100644
index 00000000..2816c32e
--- /dev/null
+++ b/agentuniverse/llm/default/qwen_openai_style_llm.py
@@ -0,0 +1,49 @@
+# !/usr/bin/env python3
+# -*- coding:utf-8 -*-
+
+# @Time    : 2024/5/21 13:52
+# @Author  : weizjajj
+# @Email   : weizhongjie.wzj@antgroup.com
+# @FileName: qwen_openai_style_llm.py
+
+from typing import Optional
+
+from dashscope import get_tokenizer
+from pydantic import Field
+
+from agentuniverse.base.util.env_util import get_from_env
+from agentuniverse.llm.openai_style_llm import OpenAIStyleLLM
+
+QWen_Max_CONTEXT_LENGTH = {
+    "qwen-turbo": 6000,
+    "qwen-plus": 300000,
+    "qwen-max": 6000,
+    "qwen-max-0428": 6000,
+    "qwen-max-0403": 6000,
+    "qwen-max-0107": 6000,
+    "qwen-max-longcontext": 28000
+}
+
+
+class QWenOpenAIStyleLLM(OpenAIStyleLLM):
+
+    """
+        QWen OpenAI style LLM
+        Args:
+            api_key: API key for the model ,from dashscope : DASHSCOPE_API_KEY
+            api_base: API base URL for the model, from dashscope : DASHSCOPE_API_BASE
+    """
+
+    api_key: Optional[str] = Field(default_factory=lambda: get_from_env("DASHSCOPE_API_KEY"))
+    api_base: Optional[str] = "https://dashscope.aliyuncs.com/compatible-mode/v1"
+    proxy: Optional[str] = Field(default_factory=lambda: get_from_env("DASHSCOPE_PROXY"))
+    organization: Optional[str] = Field(default_factory=lambda: get_from_env("DASHSCOPE_ORGANIZATION"))
+
+    def max_context_length(self) -> int:
+        if super().max_context_length():
+            return super().max_context_length()
+        return QWen_Max_CONTEXT_LENGTH.get(self.model_name, 8000)
+
+    def get_num_tokens(self, text: str) -> int:
+        tokenizer = get_tokenizer(self.model_name)
+        return len(tokenizer.encode(text))
diff --git a/agentuniverse/llm/default/qwen_openai_style_llm.yaml b/agentuniverse/llm/default/qwen_openai_style_llm.yaml
new file mode 100644
index 00000000..c9a1a4f5
--- /dev/null
+++ b/agentuniverse/llm/default/qwen_openai_style_llm.yaml
@@ -0,0 +1,8 @@
+name: 'default_qwen_llm'
+description: 'default openai llm with spi'
+model_name: 'qwen-turbo'
+max_tokens: 1000
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.qwen_openai_style_llm'
+  class: 'QWenOpenAIStyleLLM'
\ No newline at end of file
diff --git a/agentuniverse/llm/default/wenxin_llm.py b/agentuniverse/llm/default/wenxin_llm.py
new file mode 100644
index 00000000..44ee53d9
--- /dev/null
+++ b/agentuniverse/llm/default/wenxin_llm.py
@@ -0,0 +1,138 @@
+# !/usr/bin/env python3
+# -*- coding:utf-8 -*-
+
+# @Time    : 2024/5/21 13:52
+# @Author  : weizjajj 
+# @Email   : weizhongjie.wzj@antgroup.com
+# @FileName: wenxin_llm.py
+
+from typing import Any, Union, AsyncIterator, Iterator
+
+import qianfan
+from langchain_community.chat_models import QianfanChatEndpoint
+from langchain_core.language_models import BaseLanguageModel
+from pydantic import Field
+from qianfan import QfResponse
+from qianfan.resources.tools import tokenizer
+
+from agentuniverse.base.util.env_util import get_from_env
+from agentuniverse.llm.llm import LLM
+from agentuniverse.llm.llm_output import LLMOutput
+from agentuniverse.llm.wenxin_langchain_instance import WenXinLangChainInstance
+
+TokenModelList = [
+    'Ernie-4.0-8k',
+    'ernie-3.5-8k',
+    'ernie-speed-8k',
+    'ernie-speed-128k',
+    'ernie-lite-8k',
+    'ernie-tiny-8k',
+    'ernie-char-8k',
+]
+
+
+class WenXinLLM(LLM):
+    """WenXin LLM wrapper for LangChain.
+        This is a wrapper around the Qianfan Chat Completion API.
+        It uses the QianfanChatEndpoint class from the langchain_community package.
+        It also supports streaming and token counting.
+        It can be used with any other LangChain tools or agents.
+
+        Attributes:
+            qianfan_ak (str): The access key of the Qianfan API.
+                Defaults to the value of the QIANFAN_AK environment variable.
+            qianfan_sk (str): The secret key of the Qianfan API.
+                Defaults to the value of the QIANFAN_SK environment variable.
+    """
+    qianfan_ak: str = Field(default_factory=lambda: get_from_env("QIANFAN_AK"))
+    qianfan_sk: str = Field(default_factory=lambda: get_from_env("QIANFAN_SK"))
+
+    def _new_client(self):
+        """Create a new Qianfan client."""
+        return qianfan.ChatCompletion(ak=self.qianfan_ak, sk=self.qianfan_sk)
+
+    def call(self, messages: list, **kwargs: Any) -> Union[LLMOutput, Iterator[LLMOutput]]:
+        """Run the OpenAI LLM.
+
+        Args:
+            messages (list): The messages to send to the LLM.
+            **kwargs: Arbitrary keyword arguments.
+        """
+        streaming = kwargs.pop("streaming") if "streaming" in kwargs else self.streaming
+        self.client = self._new_client()
+        client = self.client
+        chat_completion = client.do(
+            messages=messages,
+            model=kwargs.pop('model', self.model_name),
+            temperature=kwargs.pop('temperature', self.temperature),
+            stream=kwargs.pop('stream', streaming),
+            max_tokens=kwargs.pop('max_tokens', self.max_tokens),
+            **kwargs,
+        )
+        if not streaming:
+            return self.parse_result(chat_completion)
+        return self.generate_stream_result(chat_completion)
+
+    async def acall(self, messages: list, **kwargs: Any) -> Union[LLMOutput, AsyncIterator[LLMOutput]]:
+        """Asynchronously run the OpenAI LLM.
+
+        Args:
+            messages (list): The messages to send to the LLM.
+            **kwargs: Arbitrary keyword arguments.
+        """
+        streaming = kwargs.pop("streaming") if "streaming" in kwargs else self.streaming
+        self.async_client = self._new_client()
+        async_client = self.async_client
+        chat_completion = await async_client.ado(
+            messages=messages,
+            model=kwargs.pop('model', self.model_name),
+            temperature=kwargs.pop('temperature', self.temperature),
+            stream=kwargs.pop('stream', streaming),
+            max_tokens=kwargs.pop('max_tokens', self.max_tokens),
+            **kwargs,
+        )
+        if not streaming:
+            return self.parse_result(chat_completion)
+        return self.agenerate_stream_result(chat_completion)
+
+    def max_context_length(self) -> int:
+        if super().max_context_length():
+            return super().max_context_length()
+        res = self._new_client().get_model_info(self.model_name)
+        if res.max_input_tokens:
+            return res.max_input_tokens
+        return res.max_input_chars
+
+    def get_num_tokens(self, text: str) -> int:
+        model_name = ''
+        if self.model_name.lower() in TokenModelList:
+            model_name = self.model_name.lower()
+        token_cnt = tokenizer.Tokenizer().count_tokens(
+            text=text,
+            mode='remote',
+            model=model_name
+        )
+        return token_cnt
+
+    @staticmethod
+    def parse_result(chunk: QfResponse):
+        text = chunk.body.get('result')
+        if not text:
+            return None
+        return LLMOutput(text=text, raw=chunk)
+
+    def generate_stream_result(self, chat_completion) -> Iterator[LLMOutput]:
+        for chunk in chat_completion:
+            data = self.parse_result(chunk)
+            if data:
+                yield data
+
+    async def agenerate_stream_result(self, chat_completion: AsyncIterator) -> AsyncIterator[LLMOutput]:
+        async for chunk in chat_completion:
+            data = self.parse_result(chunk)
+            if data:
+                yield data
+
+    def as_langchain(self) -> BaseLanguageModel:
+        """Return an instance of the LangChain `BaseLanguageModel` class."""
+        return WenXinLangChainInstance(llm=self)
diff --git a/agentuniverse/llm/default/wenxin_llm.yaml b/agentuniverse/llm/default/wenxin_llm.yaml
new file mode 100644
index 00000000..2f67766b
--- /dev/null
+++ b/agentuniverse/llm/default/wenxin_llm.yaml
@@ -0,0 +1,9 @@
+name: 'default_wenxin_llm'
+description: 'default openai llm with spi'
+model_name: 'ERNIE-3.5-8K'
+max_tokens: 1000
+streaming: true
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.wenxin_llm'
+  class: 'WenXinLLM'
\ No newline at end of file
diff --git a/agentuniverse/llm/llm.py b/agentuniverse/llm/llm.py
index f56ebb87..23c97d26 100644
--- a/agentuniverse/llm/llm.py
+++ b/agentuniverse/llm/llm.py
@@ -44,6 +44,7 @@ class LLM(ComponentBase):
     max_retries: Optional[int] = 2
     streaming: Optional[bool] = False
     ext_info: Optional[dict] = None
+    __max_context_length: Optional[int] = None
 
     def __init__(self, **kwargs):
         """Initialize the llm."""
@@ -100,6 +101,7 @@ def initialize_by_component_configer(self, component_configer: LLMConfiger) -> '
             self.streaming = component_configer.streaming
         if component_configer.ext_info:
             self.ext_info = component_configer.ext_info
+
         return self
 
     def set_by_agent_model(self, **kwargs) -> None:
@@ -116,13 +118,15 @@ def set_by_agent_model(self, **kwargs) -> None:
             self.max_retries = kwargs['max_retries']
         if 'streaming' in kwargs and kwargs['streaming']:
             self.streaming = kwargs['streaming']
+        if 'max_context_length' in kwargs and kwargs['max_context_length']:
+            self.__max_context_length = kwargs['max_context_length']
 
-    @abstractmethod
     def max_context_length(self) -> int:
         """Max context length.
 
         The total length of input tokens and generated tokens is limited by the model's context length.
         """
+        return self.__max_context_length
 
     @abstractmethod
     def get_num_tokens(self, text: str) -> int:
@@ -136,3 +140,6 @@ def get_num_tokens(self, text: str) -> int:
         Returns:
             The integer number of tokens in the text.
         """
+
+    class Config:
+        protected_namespaces = ()
diff --git a/agentuniverse/llm/openai_llm.py b/agentuniverse/llm/openai_llm.py
index 7ff63eec..1839b036 100644
--- a/agentuniverse/llm/openai_llm.py
+++ b/agentuniverse/llm/openai_llm.py
@@ -93,20 +93,20 @@ def call(self, messages: list, **kwargs: Any) -> Union[LLMOutput, Iterator[LLMOu
             **kwargs: Arbitrary keyword arguments.
         """
         streaming = kwargs.pop("streaming") if "streaming" in kwargs else self.streaming
-        self.client = self._new_client()
-        with self.client as client:
-            chat_completion = client.chat.completions.create(
-                messages=messages,
-                model=kwargs.pop('model', self.model_name),
-                temperature=kwargs.pop('temperature', self.temperature),
-                stream=kwargs.pop('stream', streaming),
-                max_tokens=kwargs.pop('max_tokens', self.max_tokens),
-                **kwargs,
-            )
-            if not streaming:
-                text = chat_completion.choices[0].message.content
-                return LLMOutput(text=text, raw=chat_completion.model_dump())
-            return self.generate_stream_result(chat_completion)
+        if self.client is None:
+            self.client = self._new_client()
+        chat_completion = self.client.chat.completions.create(
+            messages=messages,
+            model=kwargs.pop('model', self.model_name),
+            temperature=kwargs.pop('temperature', self.temperature),
+            stream=kwargs.pop('stream', streaming),
+            max_tokens=kwargs.pop('max_tokens', self.max_tokens),
+            **kwargs,
+        )
+        if not streaming:
+            text = chat_completion.choices[0].message.content
+            return LLMOutput(text=text, raw=chat_completion.model_dump())
+        return self.generate_stream_result(chat_completion)
 
     async def acall(self, messages: list, **kwargs: Any) -> Union[LLMOutput, AsyncIterator[LLMOutput]]:
         """Asynchronously run the OpenAI LLM.
@@ -116,20 +116,20 @@ async def acall(self, messages: list, **kwargs: Any) -> Union[LLMOutput, AsyncIt
             **kwargs: Arbitrary keyword arguments.
         """
         streaming = kwargs.pop("streaming") if "streaming" in kwargs else self.streaming
-        self.async_client = self._new_async_client()
-        async with self.async_client as async_client:
-            chat_completion = await async_client.chat.completions.create(
-                messages=messages,
-                model=kwargs.pop('model', self.model_name),
-                temperature=kwargs.pop('temperature', self.temperature),
-                stream=kwargs.pop('stream', streaming),
-                max_tokens=kwargs.pop('max_tokens', self.max_tokens),
-                **kwargs,
-            )
-            if not streaming:
-                text = chat_completion.choices[0].message.content
-                return LLMOutput(text=text, raw=chat_completion.model_dump())
-            return self.agenerate_stream_result(chat_completion)
+        if self.async_client is None:
+            self.async_client = self._new_async_client()
+        chat_completion = await self.async_client.chat.completions.create(
+            messages=messages,
+            model=kwargs.pop('model', self.model_name),
+            temperature=kwargs.pop('temperature', self.temperature),
+            stream=kwargs.pop('stream', streaming),
+            max_tokens=kwargs.pop('max_tokens', self.max_tokens),
+            **kwargs,
+        )
+        if not streaming:
+            text = chat_completion.choices[0].message.content
+            return LLMOutput(text=text, raw=chat_completion.model_dump())
+        return self.agenerate_stream_result(chat_completion)
 
     def as_langchain(self) -> BaseLanguageModel:
         """Convert the agentUniverse(aU) openai llm class to the langchain openai llm class."""
diff --git a/agentuniverse/llm/openai_style_langchain_instance.py b/agentuniverse/llm/openai_style_langchain_instance.py
new file mode 100644
index 00000000..582361a5
--- /dev/null
+++ b/agentuniverse/llm/openai_style_langchain_instance.py
@@ -0,0 +1,132 @@
+# !/usr/bin/env python3
+# -*- coding:utf-8 -*-
+
+# @Time    : 2024/5/21 13:52
+# @Author  : weizjajj
+# @Email   : weizhongjie.wzj@antgroup.com
+# @FileName: langchain_openai_style_instance.py
+
+from typing import Any, List, Optional, AsyncIterator
+
+from langchain.callbacks.manager import AsyncCallbackManagerForLLMRun, CallbackManagerForLLMRun
+from langchain.schema import BaseMessage, ChatResult
+from langchain_community.chat_models.openai import _convert_delta_to_message_chunk
+from langchain_core.language_models.chat_models import generate_from_stream, agenerate_from_stream
+from langchain_core.messages import AIMessageChunk
+from langchain_core.outputs import ChatGenerationChunk
+from langchain_community.chat_models import ChatOpenAI
+
+from agentuniverse.llm.llm import LLM
+
+
+class LangchainOpenAIStyleInstance(ChatOpenAI):
+    """Langchain OpenAI LLM wrapper."""
+
+    llm: Optional[LLM] = None
+
+    def __init__(self, llm: LLM):
+        """The __init__ method.
+
+        The agentUniverse LLM instance is passed to this class as an argument.
+        Convert the attributes of agentUniverse(aU) LLM instance to the LangchainOpenAI object for initialization
+
+        Args:
+            llm (LLM): the agentUniverse(aU) LLM instance.
+        """
+        init_params = dict()
+        init_params['model_name'] = llm.model_name if llm.model_name else 'gpt-3.5-turbo'
+        init_params['temperature'] = llm.temperature if llm.temperature else 0.7
+        init_params['request_timeout'] = llm.request_timeout
+        init_params['max_tokens'] = llm.max_tokens
+        init_params['max_retries'] = llm.max_retries if llm.max_retries else 2
+        init_params['streaming'] = llm.streaming if llm.streaming else False
+        init_params['openai_api_key'] = llm.api_key if llm.api_key else 'blank'
+        init_params['openai_organization'] = llm.organization
+        init_params['openai_api_base'] = llm.api_base
+        init_params['openai_proxy'] = llm.proxy
+        super().__init__(**init_params)
+        self.llm = llm
+
+    def _generate(
+            self,
+            messages: List[BaseMessage],
+            stop: Optional[List[str]] = None,
+            run_manager: Optional[CallbackManagerForLLMRun] = None,
+            stream: Optional[bool] = None,
+            **kwargs,
+    ) -> ChatResult:
+        """Run the Langchain OpenAI LLM."""
+        should_stream = stream if stream is not None else self.streaming
+        message_dicts, params = self._create_message_dicts(messages, stop)
+        params = {**params, **kwargs}
+        llm_output = self.llm.call(messages=message_dicts, **params)
+        if not should_stream:
+            return self._create_chat_result(llm_output.raw)
+        stream_iter = self.as_langchain_chunk(llm_output)
+        return generate_from_stream(stream_iter)
+
+    async def _agenerate(
+            self,
+            messages: List[BaseMessage],
+            stop: Optional[List[str]] = None,
+            run_manager: Optional[AsyncCallbackManagerForLLMRun] = None,
+            stream: Optional[bool] = None,
+            **kwargs: Any,
+    ) -> ChatResult:
+
+        """Asynchronously run the Langchain OpenAI LLM."""
+        should_stream = stream if stream is not None else self.streaming
+        message_dicts, params = self._create_message_dicts(messages, stop)
+        params = {**params, **kwargs}
+        llm_output = await self.llm.acall(messages=message_dicts, **params)
+        if not should_stream:
+            return self._create_chat_result(llm_output.raw)
+        stream_iter = self.as_langchain_achunk(llm_output)
+        return await agenerate_from_stream(stream_iter)
+
+    @staticmethod
+    def as_langchain_chunk(stream, run_manager=None):
+        default_chunk_class = AIMessageChunk
+        for llm_result in stream:
+            chunk = llm_result.raw
+            if not isinstance(chunk, dict):
+                chunk = chunk.dict()
+            if len(chunk["choices"]) == 0:
+                continue
+            choice = chunk["choices"][0]
+            chunk = _convert_delta_to_message_chunk(
+                choice["delta"], default_chunk_class
+            )
+            finish_reason = choice.get("finish_reason")
+            generation_info = (
+                dict(finish_reason=finish_reason) if finish_reason is not None else None
+            )
+            default_chunk_class = chunk.__class__
+            chunk = ChatGenerationChunk(message=chunk, generation_info=generation_info)
+            yield chunk
+            if run_manager:
+                run_manager.on_llm_new_token(chunk.text, chunk=chunk)
+
+    @staticmethod
+    async def as_langchain_achunk(stream_iterator: AsyncIterator, run_manager=None) \
+            -> AsyncIterator[ChatGenerationChunk]:
+        default_chunk_class = AIMessageChunk
+        async for llm_result in stream_iterator:
+            chunk = llm_result.raw
+            if not isinstance(chunk, dict):
+                chunk = chunk.dict()
+            if len(chunk["choices"]) == 0:
+                continue
+            choice = chunk["choices"][0]
+            chunk = _convert_delta_to_message_chunk(
+                choice["delta"], default_chunk_class
+            )
+            finish_reason = choice.get("finish_reason")
+            generation_info = (
+                dict(finish_reason=finish_reason) if finish_reason is not None else None
+            )
+            default_chunk_class = chunk.__class__
+            chunk = ChatGenerationChunk(message=chunk, generation_info=generation_info)
+            yield chunk
+            if run_manager:
+                await run_manager.on_llm_new_token(token=chunk.text, chunk=chunk)
diff --git a/agentuniverse/llm/openai_style_llm.py b/agentuniverse/llm/openai_style_llm.py
new file mode 100644
index 00000000..4a668374
--- /dev/null
+++ b/agentuniverse/llm/openai_style_llm.py
@@ -0,0 +1,186 @@
+# !/usr/bin/env python3
+# -*- coding:utf-8 -*-
+
+# @Time    : 2024/5/21 13:52
+# @Author  : weizjajj
+# @Email   : weizhongjie.wzj@antgroup.com
+# @FileName: openai_style_llm.py
+
+from typing import Any, Optional, AsyncIterator, Iterator, Union
+
+import httpx
+import openai
+import tiktoken
+from langchain_core.language_models.base import BaseLanguageModel
+from openai import OpenAI, AsyncOpenAI
+
+from agentuniverse.llm.llm import LLM, LLMOutput
+from agentuniverse.llm.openai_style_langchain_instance import LangchainOpenAIStyleInstance
+
+
+class OpenAIStyleLLM(LLM):
+    """
+    This is a wrapper around the OpenAI API that implements a chat interface for the LLM.
+    It uses the `chat` endpoint of the OpenAI API.
+    It also supports using the `completion` endpoint instead of the `chat` endpoint.
+    It supports both sync and async modes.
+    Attributes:
+        api_key (Optional[str]): The API key to use for authentication.
+        organization (Optional[str]): The organization ID to use for authentication.
+        api_base (Optional[str]): The base URL to use for the API requests.
+        proxy (Optional[str]): The proxy to use for the API requests.
+        client_args (Optional[dict]): Additional arguments to pass to the client.
+    """
+
+    api_key: Optional[str] = None
+    organization: Optional[str] = None
+    api_base: Optional[str] = None
+    proxy: Optional[str] = None
+    client_args: Optional[dict] = None
+
+    def _new_client(self):
+        """Initialize the openai client."""
+        return OpenAI(
+            api_key=self.api_key,
+            organization=self.organization,
+            base_url=self.api_base,
+            timeout=self.request_timeout,
+            max_retries=self.max_retries,
+            http_client=httpx.Client(proxy=self.openai_proxy) if self.proxy else None,
+            **(self.client_args or {}),
+        )
+
+    def _new_async_client(self):
+        """Initialize the openai async client."""
+        return AsyncOpenAI(
+            api_key=self.api_key,
+            organization=self.organization,
+            base_url=self.api_base,
+            timeout=self.request_timeout,
+            max_retries=self.max_retries,
+            http_client=httpx.AsyncClient(proxy=self.proxy) if self.proxy else None,
+            **(self.client_args or {}),
+        )
+
+    def call(self, messages: list, **kwargs: Any) -> Union[LLMOutput, Iterator[LLMOutput]]:
+        """Run the OpenAI LLM.
+
+        Args:
+            messages (list): The messages to send to the LLM.
+            **kwargs: Arbitrary keyword arguments.
+        """
+        streaming = kwargs.pop("streaming") if "streaming" in kwargs else self.streaming
+        self.client = self._new_client()
+        client = self.client
+        chat_completion = client.chat.completions.create(
+            messages=messages,
+            model=kwargs.pop('model', self.model_name),
+            temperature=kwargs.pop('temperature', self.temperature),
+            stream=kwargs.pop('stream', streaming),
+            max_tokens=kwargs.pop('max_tokens', self.max_tokens),
+            **kwargs,
+        )
+        if not streaming:
+            text = chat_completion.choices[0].message.content
+            self.close()
+            return LLMOutput(text=text, raw=chat_completion.model_dump())
+        return self.generate_stream_result(chat_completion)
+
+    async def acall(self, messages: list, **kwargs: Any) -> Union[LLMOutput, AsyncIterator[LLMOutput]]:
+        """Asynchronously run the OpenAI LLM.
+
+        Args:
+            messages (list): The messages to send to the LLM.
+            **kwargs: Arbitrary keyword arguments.
+        """
+        streaming = kwargs.pop("streaming") if "streaming" in kwargs else self.streaming
+        self.async_client = self._new_async_client()
+        async_client = self.async_client
+        chat_completion = await async_client.chat.completions.create(
+            messages=messages,
+            model=kwargs.pop('model', self.model_name),
+            temperature=kwargs.pop('temperature', self.temperature),
+            stream=kwargs.pop('stream', streaming),
+            max_tokens=kwargs.pop('max_tokens', self.max_tokens),
+            **kwargs,
+        )
+        if not streaming:
+            text = chat_completion.choices[0].message.content
+            await self.aclose()
+            return LLMOutput(text=text, raw=chat_completion.model_dump())
+        return self.agenerate_stream_result(chat_completion)
+
+    def as_langchain(self) -> BaseLanguageModel:
+        """Convert the AgentUniverse(AU) openai llm class to the langchain openai llm class."""
+        return LangchainOpenAIStyleInstance(self)
+
+    def set_by_agent_model(self, **kwargs) -> None:
+        """ Assign values of parameters to the OpenAILLM model in the agent configuration."""
+        super().set_by_agent_model(**kwargs)
+        if 'api_key' in kwargs and kwargs['api_key']:
+            self.api_key = kwargs['api_key']
+        if 'api_base' in kwargs and kwargs['api_base']:
+            self.api_base = kwargs['api_base']
+        if 'proxy' in kwargs and kwargs['proxy']:
+            self.proxy = kwargs['proxy']
+        if 'client_args' in kwargs and kwargs['client_args']:
+            self.client_args = kwargs['client_args']
+
+    @staticmethod
+    def parse_result(chunk):
+        """Generate the result of the stream."""
+        chat_completion = chunk
+        if not isinstance(chunk, dict):
+            chunk = chunk.dict()
+        if len(chunk["choices"]) == 0:
+            return
+        choice = chunk["choices"][0]
+        message = choice.get("delta")
+        text = message.get("content")
+        if not text:
+            return
+        return LLMOutput(text=text, raw=chat_completion.model_dump())
+
+    def generate_stream_result(self, stream: openai.Stream):
+        """Generate the result of the stream."""
+        for chunk in stream:
+            llm_output = self.parse_result(chunk)
+            if llm_output:
+                yield llm_output
+        self.close()
+
+    async def agenerate_stream_result(self, stream: AsyncIterator) -> AsyncIterator[LLMOutput]:
+        """Generate the result of the stream."""
+        async for chunk in stream:
+            llm_output = self.parse_result(chunk)
+            if llm_output:
+                yield llm_output
+
+        await self.aclose()
+
+    def get_num_tokens(self, text: str) -> int:
+        """Get the number of tokens present in the text.
+
+        Useful for checking if an input will fit in an openai model's context window.
+
+        Args:
+            text: The string input to tokenize.
+
+        Returns:
+            The integer number of tokens in the text.
+        """
+        try:
+            encoding = tiktoken.encoding_for_model(self.model_name)
+        except KeyError:
+            encoding = tiktoken.get_encoding("cl100k_base")
+        return len(encoding.encode(text))
+
+    def close(self):
+        """Close the client."""
+        if hasattr(self, 'client') and self.client:
+            self.client.close()
+
+    async def aclose(self):
+        """Async close the client."""
+        if hasattr(self, 'async_client') and self.async_client:
+            await self.async_client.close()
diff --git a/agentuniverse/llm/wenxin_langchain_instance.py b/agentuniverse/llm/wenxin_langchain_instance.py
new file mode 100644
index 00000000..feb1ed3d
--- /dev/null
+++ b/agentuniverse/llm/wenxin_langchain_instance.py
@@ -0,0 +1,202 @@
+# !/usr/bin/env python3
+# -*- coding:utf-8 -*-
+
+# @Time    : 2024/5/22 16:01
+# @Author  : weizjajj 
+# @Email   : weizhongjie.wzj@antgroup.com
+# @FileName: wenxin_langchain_instance.py
+
+
+from typing import List, Optional, Any, Dict, Iterator, AsyncIterator
+
+from langchain_community.chat_models import QianfanChatEndpoint
+from langchain_community.chat_models.baidu_qianfan_endpoint import _convert_dict_to_message
+from langchain_core.callbacks import CallbackManagerForLLMRun, AsyncCallbackManagerForLLMRun
+from langchain_core.messages import BaseMessage, AIMessage, AIMessageChunk
+from langchain_core.outputs import ChatResult, ChatGeneration, ChatGenerationChunk
+
+from agentuniverse.llm.llm import LLM
+
+
+class WenXinLangChainInstance(QianfanChatEndpoint):
+    llm: LLM = None
+
+    def __init__(self, llm: LLM):
+        init_params = {"qianfan_ak": llm.qianfan_ak, "qianfan_sk": llm.qianfan_sk, "model": llm.model_name,
+                       "max_tokens": llm.max_tokens, "timeout": llm.request_timeout,
+                       'max_retries': llm.max_retries if llm.max_retries else 2,
+                       'streaming': llm.streaming if llm.streaming else False,
+                       'temperature': llm.temperature if llm.temperature else 0.7, 'llm': llm}
+        super().__init__(**init_params)
+
+    def _generate(
+            self,
+            messages: List[BaseMessage],
+            stop: Optional[List[str]] = None,
+            run_manager: Optional[CallbackManagerForLLMRun] = None,
+            **kwargs: Any,
+    ) -> ChatResult:
+        """Call out to an qianfan models endpoint for each generation with a prompt.
+              Args:
+                  messages: The messages to pass into the model.
+                  stop: Optional list of stop words to use when generating.
+              Returns:
+                  The string generated by the model.
+
+              Example:
+                  .. code-block:: python
+                      response = qianfan_model.invoke("Tell me a joke.")
+              """
+        if self.streaming:
+            completion = ""
+            token_usage = {}
+            chat_generation_info: Dict = {}
+            for chunk in self._stream(messages, stop, run_manager, **kwargs):
+                chat_generation_info = (
+                    chunk.generation_info
+                    if chunk.generation_info is not None
+                    else chat_generation_info
+                )
+                completion += chunk.text
+            lc_msg = AIMessage(content=completion, additional_kwargs={})
+            gen = ChatGeneration(
+                message=lc_msg,
+                generation_info=dict(finish_reason="stop"),
+            )
+            return ChatResult(
+                generations=[gen],
+                llm_output={
+                    "token_usage": chat_generation_info.get("usage", {}),
+                    "model_name": self.model,
+                },
+            )
+        params = self._convert_prompt_msg_params(messages, **kwargs)
+        params["stop"] = stop
+        response_payload = self.llm.call(**params).raw
+        lc_msg = _convert_dict_to_message(response_payload)
+        gen = ChatGeneration(
+            message=lc_msg,
+            generation_info={
+                "finish_reason": "stop",
+                **response_payload.get("body", {}),
+            },
+        )
+        token_usage = response_payload.get("usage", {})
+        llm_output = {"token_usage": token_usage, "model_name": self.model}
+        return ChatResult(generations=[gen], llm_output=llm_output)
+
+    async def _agenerate(
+        self,
+        messages: List[BaseMessage],
+        stop: Optional[List[str]] = None,
+        run_manager: Optional[AsyncCallbackManagerForLLMRun] = None,
+        **kwargs: Any,
+    ) -> ChatResult:
+        if self.streaming:
+            completion = ""
+            token_usage = {}
+            chat_generation_info: Dict = {}
+            async for chunk in self._astream(messages, stop, run_manager, **kwargs):
+                chat_generation_info = (
+                    chunk.generation_info
+                    if chunk.generation_info is not None
+                    else chat_generation_info
+                )
+                completion += chunk.text
+
+            lc_msg = AIMessage(content=completion, additional_kwargs={})
+            gen = ChatGeneration(
+                message=lc_msg,
+                generation_info=dict(finish_reason="stop"),
+            )
+            return ChatResult(
+                generations=[gen],
+                llm_output={
+                    "token_usage": chat_generation_info.get("usage", {}),
+                    "model_name": self.model,
+                },
+            )
+        params = self._convert_prompt_msg_params(messages, **kwargs)
+        params["stop"] = stop
+        response_payload = await self.llm.acall(**params)
+        response_payload = response_payload.raw
+        lc_msg = _convert_dict_to_message(response_payload)
+        generations = []
+        gen = ChatGeneration(
+            message=lc_msg,
+            generation_info={
+                "finish_reason": "stop",
+                **response_payload.get("body", {}),
+            },
+        )
+        generations.append(gen)
+        token_usage = response_payload.get("usage", {})
+        llm_output = {"token_usage": token_usage, "model_name": self.model}
+        return ChatResult(generations=generations, llm_output=llm_output)
+
+    def _stream(
+            self,
+            messages: List[BaseMessage],
+            stop: Optional[List[str]] = None,
+            run_manager: Optional[CallbackManagerForLLMRun] = None,
+            **kwargs: Any,
+    ) -> Iterator[ChatGenerationChunk]:
+        """Call out to an qianfan models endpoint for each generation with a prompt.
+              Args:
+                  messages: The messages to pass into the model.
+                  stop: Optional list of stop words to use when generating.
+              Returns:
+                  The string generated by the model.
+
+              Example:
+                  .. code-block:: python
+                      response = qianfan_model.invoke("Tell me a joke.")
+              """
+        params = self._convert_prompt_msg_params(messages, **kwargs)
+        params["stop"] = stop
+        params["stream"] = True
+        for res in self.llm.call(**params):
+            if res:
+                res = res.raw
+                msg = _convert_dict_to_message(res)
+                additional_kwargs = msg.additional_kwargs.get("function_call", {})
+                chunk = ChatGenerationChunk(
+                    text=res["result"],
+                    message=AIMessageChunk(
+                        content=msg.content,
+                        role="assistant",
+                        additional_kwargs=additional_kwargs,
+                    ),
+                    generation_info=msg.additional_kwargs,
+                )
+                if run_manager:
+                    run_manager.on_llm_new_token(chunk.text, chunk=chunk)
+                yield chunk
+
+    async def _astream(
+            self,
+            messages: List[BaseMessage],
+            stop: Optional[List[str]] = None,
+            run_manager: Optional[AsyncCallbackManagerForLLMRun] = None,
+            **kwargs: Any,
+    ) -> AsyncIterator[ChatGenerationChunk]:
+        params = self._convert_prompt_msg_params(messages, **kwargs)
+        params["stop"] = stop
+        params["stream"] = True
+        async for res in await self.llm.acall(**params):
+            res = res.raw
+            if res:
+                msg = _convert_dict_to_message(res)
+                additional_kwargs = msg.additional_kwargs.get("function_call", {})
+                chunk = ChatGenerationChunk(
+                    text=res["result"],
+                    message=AIMessageChunk(
+                        content=msg.content,
+                        role="assistant",
+                        additional_kwargs=additional_kwargs,
+                    ),
+                    generation_info=msg.additional_kwargs,
+                )
+                if run_manager:
+                    await run_manager.on_llm_new_token(chunk.text, chunk=chunk)
+                yield chunk
diff --git a/docs/guidebook/en/0_index.md b/docs/guidebook/en/0_index.md
index b8b435ea..e42b9c39 100644
--- a/docs/guidebook/en/0_index.md
+++ b/docs/guidebook/en/0_index.md
@@ -39,12 +39,17 @@
 
 **3. Component Reference Manual**
 * 3.1 Domain Components
-  * 3.1.1 Agent
-  * 3.1.2 LLM
-  * 3.1.3 Tool
-  * 3.1.4 Knowledge
-  * 3.1.5 Memory
-  * 3.1.6 Planner
+  * 3.1.1 List of Agents
+  * 3.1.2 List of LLMs
+    * 3.1.2.1 [OpenAI Usage Instructions](3_1_2_OpenAI_LLM_Use.md)
+    * 3.1.2.2 [Qwen Usage Instructions](3_1_2_Qwen_LLM_Use.md)
+    * 3.1.2.3 [WenXin Usage Instructions](3_1_2_WenXin_LLM_Use.md)
+    * 3.1.2.4 [Kimi Usage Instructions](3_1_2_Kimi_LLM_Use.md)
+    * 3.1.2.5 [BaiChuan Usage Instructions](3_1_2_BaiChuan_LLM_Use.md)
+  * 3.1.3 List of Tools
+  * 3.1.4 List of Knowledge
+  * 3.1.5 List of Memories
+  * 3.1.6 List of Planners
 * 3.2 Technical Components
   * 3.2.1 RPC
     * 3.2.1.1 [gRPC](3_2_1_gRPC.md)
diff --git a/docs/guidebook/en/2_2_1_Agent_Create_And_Use.md b/docs/guidebook/en/2_2_1_Agent_Create_And_Use.md
index 92688689..9bfc764f 100644
--- a/docs/guidebook/en/2_2_1_Agent_Create_And_Use.md
+++ b/docs/guidebook/en/2_2_1_Agent_Create_And_Use.md
@@ -24,7 +24,7 @@ We will provide detailed descriptions of each component in the configuration.
   * `name`: name of LLM
   * `model_name`: model_name of LLM
 
-  You can choose any existing LLM or connect to any LLM of your choice. We will not elaborate on this part here; you can refer to the LLM section for more details.
+  You can choose any existing LLM or connect to any LLM of your choice. We will not elaborate on this part here; you can refer to the [LLM section](2_2_2_LLM.md) for more details.
 
 ### Setting the agent's plan
 **`plan` - plan of agent**
@@ -41,7 +41,7 @@ We will provide detailed descriptions of each component in the configuration.
     \- tool_name_b  
     \- tool_name_c  
 
-  You can choose any existing Tool or connect to any Tool of your choice. We will not elaborate on this part here; you can refer to the Tool section for more details.
+  You can choose any existing Tool or connect to any Tool of your choice. We will not elaborate on this part here; you can refer to the [Tool section](2_2_3_Tool.md) for more details.
 
 * `Knowledge` : Knowledge available for the agent's use.
   * knowledge_name_list，list of knowledge names, for example:   
diff --git a/docs/guidebook/en/2_2_2_LLM_component_define_and_usage.md b/docs/guidebook/en/2_2_2_LLM_component_define_and_usage.md
index 19ed2831..1d2f76b9 100644
--- a/docs/guidebook/en/2_2_2_LLM_component_define_and_usage.md
+++ b/docs/guidebook/en/2_2_2_LLM_component_define_and_usage.md
@@ -483,6 +483,11 @@ metadata:
 You can find more LLM metadata in the [Understanding More Existing LLM Components](#Understanding More Existing LLM Components) section of this document.
 
 # How to Use Model LLM Components
+## Configure for use in an Agent
+You can set up any LLM you have created in the llm_model of your agent according to the contents of [Agent Creation and Usage section](2_2_1_Agent_Create_And_Use.md).
+
+Refer to the example: `demo_multillm_agent`, with the specific file path being `sample_standard_app/app/core/agent/rag_agent_case/demo_multillm_agent.yaml`.
+
 ## Using the LLM Manager
 You can obtain an LLM instance with the specified name through the `.get_instance_obj(xx_llm_name)` method in the LLM Manager.
 
diff --git a/docs/guidebook/en/3_1_2_0_List_Of_LLMs.md b/docs/guidebook/en/3_1_2_0_List_Of_LLMs.md
new file mode 100644
index 00000000..5d5975eb
--- /dev/null
+++ b/docs/guidebook/en/3_1_2_0_List_Of_LLMs.md
@@ -0,0 +1,14 @@
+# List of LLMs
+The platform has currently integrated the following list of models; please refer to this section for detailed usage instructions for each LLM.
+
+| LLM (Series) Name                     |
+|---------------------------------------|
+| [OpenAI](3_1_2_OpenAI_LLM_Use.md)     |
+| [Qwen](3_1_2_Qwen_LLM_Use.md)         |
+| [WenXin](3_1_2_WenXin_LLM_Use.md)     |
+| [Kimi](3_1_2_Kimi_LLM_Use.md)         |
+| [BaiChuan](3_1_2_BaiChuan_LLM_Use.md) |
+
+For LLM not included in the list, you can customize the integration of any LLM according to the steps provided in the [LLM definition](2_2_3_Tool_Create_And_Use.md).
+
+At the same time, we are adding the integration methods for common LLMs such as Claude, Gemini, ollama, Llama, ZhipuAI, etc. If you have used these LLMs in your projects and have created your own instances, we welcome you to submit a PR to become a contributor to agentUniverse.
\ No newline at end of file
diff --git a/docs/guidebook/en/3_1_2_BaiChuan_LLM_Use.md b/docs/guidebook/en/3_1_2_BaiChuan_LLM_Use.md
new file mode 100644
index 00000000..36e03873
--- /dev/null
+++ b/docs/guidebook/en/3_1_2_BaiChuan_LLM_Use.md
@@ -0,0 +1,36 @@
+# BaiChuan Usage
+## 1. Create the relevant file.
+Create a YAML file, for example, user_claude.yaml
+Paste the following content into your user_claude.yaml file.
+```yaml
+name: 'user_baichuan_llm'
+description: 'user baichuan llm with spi'
+model_name: 'Baichuan2-Turbo'
+max_tokens: 1000
+max_context_length: The maximum length of context
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.baichuan_openai_style_llm'
+  class: 'BAICHUANOpenAIStyleLLM'
+```
+## 2. Environment Setup
+### 2.1 Configure through Python code
+Must be configured: BAICHUAN_API_KEY  
+Optional: BAICHUAN_API_BASE, BAICHUAN_PROXY
+```python
+import os
+os.environ['BAICHUAN_API_KEY'] = 'sk-***'
+os.environ['BAICHUAN_PROXY'] = 'https://xxxxxx'
+```
+### 2.2 Configure through the configuration file
+In the custom_key.toml file under the config directory of the project, add the configuration:
+```toml
+BAICHUAN_API_KEY="sk-******"
+BAICHUAN_PROXY="https://xxxxxx"
+```
+## 3. Obtaining the BAICHUAN API KEY
+Reference BaiChuan Official Documentation: https://platform.baichuan-ai.com/console/apikey
+
+## 4. Tips
+In agentuniverse, we have already created an llm with the name default_baichuan_llm. After configuring the BAICHUAN_API_KEY, users can directly use it.
+
diff --git a/docs/guidebook/en/3_1_2_Kimi_LLM_Use.md b/docs/guidebook/en/3_1_2_Kimi_LLM_Use.md
new file mode 100644
index 00000000..775e5999
--- /dev/null
+++ b/docs/guidebook/en/3_1_2_Kimi_LLM_Use.md
@@ -0,0 +1,34 @@
+# KIMI Usage
+## 1. Create the relevant file.
+Create a YAML file, for example, user_kimi.yaml
+Paste the following content into your user_kimi.yaml file.
+```yaml
+name: 'user_kimi_llm'
+description: 'user kimi llm with spi'
+model_name: 'moonshot-v1-8k'
+max_tokens: 1000
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.kimi_openai_style_llm'
+  class: 'KIMIOpenAIStyleLLM'
+```
+## 2. Environment Setup
+Must be configured: KIMI_API_KEY
+Optional: KIMI_PROXY
+### 2.1 Configure through Python code
+```python
+import os
+os.environ['KIMI_API_KEY'] = 'sk-***'
+os.environ['KIMI_PROXY'] = 'https://xxxxxx'
+```
+### 2.2 Configure through the configuration file
+In the custom_key.toml file under the config directory of the project, add the configuration:
+```toml
+KIMI_API_KEY="sk-******"
+KIMI_PROXY="https://xxxxxx" 
+```
+## 3. Obtaining the KIMI API KEY 
+Reference KIMI Official Documentation:https://platform.moonshot.cn/console/api-keys
+
+## 4. Tips
+In agentuniverse, we have already created an llm with the name default_kimi_llm. After configuring the KIMI_API_KEY, users can directly use it.
diff --git a/docs/guidebook/en/3_1_2_OpenAI_LLM_Use.md b/docs/guidebook/en/3_1_2_OpenAI_LLM_Use.md
new file mode 100644
index 00000000..9c1a0a0a
--- /dev/null
+++ b/docs/guidebook/en/3_1_2_OpenAI_LLM_Use.md
@@ -0,0 +1,38 @@
+# OpenAI Usage
+## 1. Create the relevant file.
+Create a YAML file, for example, user_openai.yaml
+Paste the following content into your user_openai.yaml file.
+```yaml
+name: 'user_openai_llm'
+description: 'user define openai llm'
+model_name: 'gpt-3.5-turbo'
+max_tokens: 1000
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.default_openai_llm'
+  class: 'DefaultOpenAILLM'
+```
+## 2. Environment Setup
+Must be configured: OPENAI_API_KEY    
+Optional: OPENAI_PROXY, OPENAI_API_BASE
+### 2.1 Configure through Python code
+```python
+import os
+os.environ['OPENAI_API_KEY'] = 'sk-***'
+os.environ['OPENAI_PROXY'] = 'https://xxxxxx'
+os.environ['OPENAI_API_BASE'] = 'http://xxxx/v1'
+```
+### 2.2 Configure through the configuration file
+In the custom_key.toml file under the config directory of the project, add the configuration:
+```toml
+OPENAI_API_KEY="sk-******"
+OPENAI_PROXY="https://xxxxxx"
+OPENAI_API_BASE="http://xxxx/v1"
+```
+## 3. Obtaining the OpenAI API KEY 
+[参考文档](https://platform.openai.com/account/api-keys)
+
+## 4. Tips
+In agentuniverse, we have already created an llm with the name default_openai_llm. After configuring the OPENAI_API_KEY, users can directly use it.
+
+
diff --git a/docs/guidebook/en/3_1_2_Qwen_LLM_Use.md b/docs/guidebook/en/3_1_2_Qwen_LLM_Use.md
new file mode 100644
index 00000000..e58fb1b0
--- /dev/null
+++ b/docs/guidebook/en/3_1_2_Qwen_LLM_Use.md
@@ -0,0 +1,36 @@
+# Qwen Use
+## 1. Create the relevant file.
+Create a YAML file, for example, user_qwen.yaml
+Paste the following content into your user_qwen.yaml file.
+```yaml
+name: 'user_qwen_llm'
+description: 'user qwen llm with spi'
+model_name: 'qwen-turbo'
+max_tokens: 1000
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.qwen_openai_style_llm'
+  class: 'QWenOpenAIStyleLLM'
+```
+## 2. Environment Setup
+Must be configured:DASHSCOPE_API_KEY  
+Optional: DASHSCOPE_PROXY
+### 2.1 Configure through Python code
+```python
+import os
+os.environ['DASHSCOPE_API_KEY'] = 'sk-***'
+os.environ['DASHSCOPE_PROXY'] = 'https://xxxxxx'
+```
+### 2.2 Configure through the configuration file
+In the custom_key.toml file under the config directory of the project, add the configuration:
+```toml
+DASHSCOPE_API_KEY="sk-******"
+DASHSCOPE_PROXY="https://xxxxxx"
+```
+## 3. Obtaining the DASHSCOPE API KEY 
+Reference Dashscope Official Documentation：https://dashscope.console.aliyun.com/apiKey
+
+## 4. Tips
+In agentuniverse, we have already created an llm with the name default_qwen_llm. After configuring the DASHSCOPE_API_KEY, users can directly use it.
+
+
diff --git a/docs/guidebook/en/3_1_2_WenXin_LLM_Use.md b/docs/guidebook/en/3_1_2_WenXin_LLM_Use.md
new file mode 100644
index 00000000..c8069a92
--- /dev/null
+++ b/docs/guidebook/en/3_1_2_WenXin_LLM_Use.md
@@ -0,0 +1,38 @@
+# WenXin Usage
+## 1. Create the relevant file.
+Create a YAML file, for example, user_wenxin.yaml
+Paste the following content into your user_wenxin.yaml file.
+```yaml
+name: 'user_wenxin_llm'
+description: 'user wenxin llm with spi'
+model_name: 'ERNIE-3.5-8K'
+max_tokens: 1000
+streaming: true
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.wenxin_llm'
+  class: 'WenXinLLM'
+```
+## 2. Environment Setup
+Must be configured: QIANFAN_AK、QIANFAN_SK
+### 2.1 Configure through Python code
+```python
+import os
+os.environ['QIANFAN_AK'] = '*****'
+os.environ['QIANFAN_SK'] = 'xxxxx'
+```
+### 2.2 Configure through the configuration file
+In the custom_key.toml file under the config directory of the project, add the configuration:
+```toml
+QIANFAN_AK="sk-******"
+QIANFAN_SK="https://xxxxxx"
+```
+## 3. Obtaining the WenXin API KEY 
+Reference QianFan Official Documentation: https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Dlkm79mnx
+
+## 4. Tips
+In agentuniverse, we have already created an llm with the name default_wenxin_llm. After configuring the QIANFAN_AK、QIANFAN_SK, users can directly use it.
+
+
+
+
diff --git "a/docs/guidebook/zh/0_\347\233\256\345\275\225.md" "b/docs/guidebook/zh/0_\347\233\256\345\275\225.md"
index 7a8eaa13..575106a2 100644
--- "a/docs/guidebook/zh/0_\347\233\256\345\275\225.md"
+++ "b/docs/guidebook/zh/0_\347\233\256\345\275\225.md"
@@ -43,12 +43,17 @@
 
 **3.组件参考手册**
 * 3.1 领域组件
-  * 3.1.1 智能体(Agent)
-  * 3.1.2 模型(LLM)
-  * 3.1.3 工具(Tool)
-  * 3.1.4 知识(Knowledge)
-  * 3.1.5 记忆(Memory)
-  * 3.1.6 规划(Planner)
+  * 3.1.1 智能体列表(Agent)
+  * 3.1.2 模型列表(LLM)
+    * 3.1.2.1 [OpenAI使用说明](3_1_2_OpenAI使用.md)
+    * 3.1.2.2 [通义千问使用说明](3_1_2_Qwen使用.md)
+    * 3.1.2.3 [文心一言使用说明](3_1_2_文心使用.md)
+    * 3.1.2.4 [Kimi使用说明](3_1_2_Kimi使用.md)
+    * 3.1.2.5 [百川使用说明](3_1_2_百川使用.md)
+  * 3.1.3 工具列表(Tool)
+  * 3.1.4 知识列表(Knowledge)
+  * 3.1.5 记忆列表(Memory)
+  * 3.1.6 规划列表(Planner)
 * 3.2 技术组件
   * 3.2.1 RPC
     * 3.2.1.1 [gRPC](3_2_1_gRPC.md)
diff --git "a/docs/guidebook/zh/2_2_1_\346\231\272\350\203\275\344\275\223\345\210\233\345\273\272\344\270\216\344\275\277\347\224\250.md" "b/docs/guidebook/zh/2_2_1_\346\231\272\350\203\275\344\275\223\345\210\233\345\273\272\344\270\216\344\275\277\347\224\250.md"
index c46f4c66..48531449 100644
--- "a/docs/guidebook/zh/2_2_1_\346\231\272\350\203\275\344\275\223\345\210\233\345\273\272\344\270\216\344\275\277\347\224\250.md"
+++ "b/docs/guidebook/zh/2_2_1_\346\231\272\350\203\275\344\275\223\345\210\233\345\273\272\344\270\216\344\275\277\347\224\250.md"
@@ -24,7 +24,7 @@
   * `name`: LLM 名称
   * `model_name`: LLM 模型名  
 
-  您可以选择已有或接入任意的LLM，我们在本部分不展开说明，您可以关注LLM章节。
+  您可以选择已有或接入任意的LLM，我们在本部分不展开说明，您可以关注[模型LLM章节](2_2_2_模型.md)。
 
 ### 设置智能体计划
 **`plan` - 智能体计划**
@@ -41,7 +41,7 @@
     \- tool_name_b  
     \- tool_name_c  
 
-  您可以选择已有或接入任意的Tool，我们在本部分不展开说明，您可以关注Tool章节。
+  您可以选择已有或接入任意的Tool，我们在本部分不展开说明，您可以关注[Tool章节](2_2_3_工具.md)。
 
 * `Knowledge` : 供智能体使用的知识
   * knowledge_name_list，知识名称列表, 如:  
diff --git "a/docs/guidebook/zh/2_2_2_\346\250\241\345\236\213\345\256\232\344\271\211\344\270\216\344\275\277\347\224\250.md" "b/docs/guidebook/zh/2_2_2_\346\250\241\345\236\213\345\256\232\344\271\211\344\270\216\344\275\277\347\224\250.md"
index 1deb55c6..77f90a8b 100644
--- "a/docs/guidebook/zh/2_2_2_\346\250\241\345\236\213\345\256\232\344\271\211\344\270\216\344\275\277\347\224\250.md"
+++ "b/docs/guidebook/zh/2_2_2_\346\250\241\345\236\213\345\256\232\344\271\211\344\270\216\344\275\277\347\224\250.md"
@@ -478,6 +478,11 @@ metadata:
 您可以在本文的[了解更多已有模型LLM组件](#了解更多已有模型LLM组件)部分查询更多的LLM元信息。
 
 # 如何使用模型LLM组件
+## 在Agent中配置使用
+您可以根据[智能体创建与使用](2_2_1_智能体创建与使用.md)中的内容在agent的llm_model中设置您创建的任意LLM。
+
+可参考示例：`demo_multillm_agent`， 具体文件路径为 `sample_standard_app/app/core/agent/rag_agent_case/demo_multillm_agent.yaml`。
+
 ## 使用LLM管理器
 通过LLM管理器中的`.get_instance_obj(xx_llm_name)` 方法可以获取对应名称的LLM实例。
 
@@ -489,7 +494,7 @@ llm: LLM = LLMManager().get_instance_obj('llm_name')
 ```
 
 # 了解更多已有模型LLM组件
-框架提供的更多LLM组件在`agentuniverse.llm.default`包路径下，您可以进一步查看对应代码或在我们的扩展组件介绍部分进一步了解他们。
+框架提供的更多LLM组件在`agentuniverse.llm.default`包路径下，您可以进一步查看对应代码或在我们的扩展组件介绍部分进一步了解他们，更多已经接入的模型您可以在[模型列表章节](3_1_2_0_模型列表.md)中了解。
 
 # 总结
 至此您已经掌握了模型LLM的定义与使用，赶快去尝试定义与使用LLM吧。
\ No newline at end of file
diff --git "a/docs/guidebook/zh/3_1_2_0_\346\250\241\345\236\213\345\210\227\350\241\250.md" "b/docs/guidebook/zh/3_1_2_0_\346\250\241\345\236\213\345\210\227\350\241\250.md"
new file mode 100644
index 00000000..4791894c
--- /dev/null
+++ "b/docs/guidebook/zh/3_1_2_0_\346\250\241\345\236\213\345\210\227\350\241\250.md"
@@ -0,0 +1,14 @@
+# 模型（LLM）列表
+目前平台已经接入了如下模型列表，详细使用方式请关注本章节各LLM的说明。
+
+| 模型LLM(系列)名称                  |
+|------------------------------|
+| [OpenAI](3_1_2_OpenAI使用.md)  |
+| [通义千问](3_1_2_Qwen使用.md)      |
+| [文心一言](3_1_2_文心使用.md)        |
+| [Kimi](3_1_2_Kimi使用.md)      |
+| [百川](3_1_2_百川使用.md)          |
+
+未在列表中的模型您可以根据[模型定义](2_2_2_模型定义与使用.md)中的步骤自定义接入任何模型。
+
+同时我们正在添加Claude、Gemini、ollama、Llama、ZhipuAI等常见LLM的接入方式，如果您在工程中使用了这些LLM并创建了属于自己的实例，欢迎您提交pr成为agentUniverse的contributor。
\ No newline at end of file
diff --git "a/docs/guidebook/zh/3_1_2_Kimi\344\275\277\347\224\250.md" "b/docs/guidebook/zh/3_1_2_Kimi\344\275\277\347\224\250.md"
new file mode 100644
index 00000000..f5644725
--- /dev/null
+++ "b/docs/guidebook/zh/3_1_2_Kimi\344\275\277\347\224\250.md"
@@ -0,0 +1,34 @@
+# KIMI 使用
+## 1. 创建相关文件
+创建一个yaml文件，例如 user_kimi.yaml
+将以下内容粘贴到您的user_kimi.yaml文件当中
+```yaml
+name: 'user_kimi_llm'
+description: 'user kimi llm with spi'
+model_name: 'moonshot-v1-8k'
+max_tokens: 1000
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.kimi_openai_style_llm'
+  class: 'KIMIOpenAIStyleLLM'
+```
+## 2. 环境设置
+必须配置：KIMI_API_KEY
+选配：KIMI_PROXY
+### 2.1 通过python代码配置
+```python
+import os
+os.environ['KIMI_API_KEY'] = 'sk-***'
+os.environ['KIMI_PROXY'] = 'https://xxxxxx'
+```
+### 2.2 通过配置文件配置
+在项目的config目录下的custom_key.toml当中，添加配置：
+```toml
+KIMI_API_KEY="sk-******"
+KIMI_PROXY="https://xxxxxx" 
+```
+## 3. KIMI API KEY 获取
+参考 KIMI 官方文档：https://platform.moonshot.cn/console/api-keys
+
+## 4. Tips
+在agentuniverse中，我们已经创建了一个name为default_kimi_llm的llm,用户在配置KIMI_API_KEY之后可以直接使用。
diff --git "a/docs/guidebook/zh/3_1_2_OpenAI\344\275\277\347\224\250.md" "b/docs/guidebook/zh/3_1_2_OpenAI\344\275\277\347\224\250.md"
new file mode 100644
index 00000000..b3fe7188
--- /dev/null
+++ "b/docs/guidebook/zh/3_1_2_OpenAI\344\275\277\347\224\250.md"
@@ -0,0 +1,38 @@
+# OpenAI 使用
+## 1. 创建相关文件
+
+创建一个yaml文件，例如 user_openai.yaml
+将以下内容粘贴到您的user_openai.yaml文件当中
+```yaml
+name: 'user_openai_llm'
+description: 'user define openai llm'
+model_name: 'gpt-3.5-turbo'
+max_tokens: 1000
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.default_openai_llm'
+  class: 'DefaultOpenAILLM'
+```
+## 2. 环境设置
+必须配置：OPENAI_API_KEY    
+可选配置：OPENAI_PROXY, OPENAI_API_BASE
+### 2.1 通过python代码配置
+```python
+import os
+os.environ['OPENAI_API_KEY'] = 'sk-***'
+os.environ['OPENAI_PROXY'] = 'https://xxxxxx'
+os.environ['OPENAI_API_BASE'] = 'http://xxxx/v1'
+```
+### 2.2 通过配置文件配置
+在项目的config目录下的custom_key.toml当中，添加配置：
+```toml
+OPENAI_API_KEY="sk-******"
+OPENAI_PROXY="https://xxxxxx"
+OPENAI_API_BASE="http://xxxx/v1"
+```
+## 3. API KEY 获取
+[参考文档](https://platform.openai.com/account/api-keys)
+
+## 4. Tips
+在agentuniverse中，我们已经创建了一个name为default_openai_llm的llm,用户在配置OPENAI_API_KEY之后可以直接使用。
+
diff --git "a/docs/guidebook/zh/3_1_2_Qwen\344\275\277\347\224\250.md" "b/docs/guidebook/zh/3_1_2_Qwen\344\275\277\347\224\250.md"
new file mode 100644
index 00000000..4e5cf28a
--- /dev/null
+++ "b/docs/guidebook/zh/3_1_2_Qwen\344\275\277\347\224\250.md"
@@ -0,0 +1,37 @@
+# Qwen 使用
+## 1. 创建相关文件
+
+创建一个yaml文件，例如 user_qwen.yaml
+将以下内容粘贴到您的user_qwen.yaml文件当中
+```yaml
+name: 'user_qwen_llm'
+description: 'user qwen llm with spi'
+model_name: 'qwen-turbo'
+max_tokens: 1000
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.qwen_openai_style_llm'
+  class: 'QWenOpenAIStyleLLM'
+```
+## 2. 环境设置
+必须配置：DASHSCOPE_API_KEY  
+可选配置：DASHSCOPE_PROXY
+### 2.1 通过python代码配置
+```python
+import os
+os.environ['DASHSCOPE_API_KEY'] = 'sk-***'
+os.environ['DASHSCOPE_PROXY'] = 'https://xxxxxx'
+```
+### 2.2 通过配置文件配置
+在项目的config目录下的custom_key.toml当中，添加配置：
+```toml
+DASHSCOPE_API_KEY="sk-******"
+DASHSCOPE_PROXY="https://xxxxxx"
+```
+## 3. DASHSCOPE API KEY 获取
+参考 Dashscope 官方文档：https://dashscope.console.aliyun.com/apiKey
+
+## 4. Tips
+在agentuniverse中，我们已经创建了一个name为default_qwen_llm的llm,用户在配置DASHSCOPE_API_KEY之后可以直接使用。
+
+
diff --git "a/docs/guidebook/zh/3_1_2_\346\226\207\345\277\203\344\275\277\347\224\250.md" "b/docs/guidebook/zh/3_1_2_\346\226\207\345\277\203\344\275\277\347\224\250.md"
new file mode 100644
index 00000000..9a09b4d7
--- /dev/null
+++ "b/docs/guidebook/zh/3_1_2_\346\226\207\345\277\203\344\275\277\347\224\250.md"
@@ -0,0 +1,37 @@
+# WenXin 使用
+## 1. 创建相关文件
+创建一个yaml文件，例如 user_wenxin.yaml
+将以下内容粘贴到您的user_wenxin.yaml文件当中
+```yaml
+name: 'user_wenxin_llm'
+description: 'user wenxin llm with spi'
+model_name: 'ERNIE-3.5-8K'
+max_tokens: 1000
+streaming: true
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.wenxin_llm'
+  class: 'WenXinLLM'
+```
+## 2. 环境设置
+必须配置：QIANFAN_AK、QIANFAN_SK
+### 2.1 通过python代码配置
+```python
+import os
+os.environ['QIANFAN_AK'] = '*****'
+os.environ['QIANFAN_SK'] = 'xxxxx'
+```
+### 2.2 通过配置文件配置
+在项目的config目录下的custom_key.toml当中，添加配置：
+```toml
+QIANFAN_AK="sk-******"
+QIANFAN_SK="https://xxxxxx"
+```
+## 3.QIANFAN API KEY 获取
+参考 千帆 官方文档：https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Dlkm79mnx
+
+## 4. Tips
+在agentuniverse中，我们已经创建了一个name为default_wenxin_llm的llm,用户在配置QIANFAN_AK、QIANFAN_SK之后可以直接使用。
+
+
+
diff --git "a/docs/guidebook/zh/3_1_2_\347\231\276\345\267\235\344\275\277\347\224\250.md" "b/docs/guidebook/zh/3_1_2_\347\231\276\345\267\235\344\275\277\347\224\250.md"
new file mode 100644
index 00000000..9dbf1687
--- /dev/null
+++ "b/docs/guidebook/zh/3_1_2_\347\231\276\345\267\235\344\275\277\347\224\250.md"
@@ -0,0 +1,37 @@
+# 百川 使用
+## 1. 创建相关文件
+创建一个yaml文件，例如 user_baichuan.yaml
+将以下内容粘贴到您的user_baichuan.yaml文件当中
+```yaml
+name: 'user_baichuan_llm'
+description: 'user baichuan llm with spi'
+model_name: 'Baichuan2-Turbo'
+max_tokens: 1000
+api_key_name: 'BAICHUAN_API_KEY'
+api_base_name: 'BAICHUAN_API_BASE'
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.baichuan_openai_style_llm'
+  class: 'BAICHUANOpenAIStyleLLM'
+```
+## 2. 环境设置
+### 2.1 通过python代码配置
+必须配置：BAICHUAN_API_KEY  
+可选配置：BAICHUAN_API_BASE, BAICHUAN_PROXY
+```python
+import os
+os.environ['BAICHUAN_API_KEY'] = 'sk-***'
+os.environ['BAICHUAN_PROXY'] = 'https://xxxxxx'
+```
+### 2.2 通过配置文件配置
+在项目的config目录下的custom_key.toml当中，添加配置：
+```toml
+BAICHUAN_API_KEY="sk-******"
+BAICHUAN_PROXY="https://xxxxxx"
+```
+## 3. BAICHUAN API KEY 获取
+参考 百川 官方文档：https://platform.baichuan-ai.com/console/apikey
+
+## 4. Tips
+在agentuniverse中，我们已经创建了一个name为default_baichuan_llm的llm,用户在配置BAICHUAN_API_KEY之后可以直接使用。
+
diff --git a/pyproject.toml b/pyproject.toml
index 5bb51f71..b94bda12 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "agentUniverse"
-version = "0.0.6"
+version = "0.0.7"
 description = "agentUniverse is a framework for developing applications powered by multi-agent base on large language model."
 
 authors = ["AntGroup <jerry.zzw@antgroup.com>"]
@@ -41,6 +41,9 @@ sphinx-rtd-theme = "^2.0.0"
 aliyun-log-python-sdk = { version = "0.8.8", optional = true}
 googleapis-common-protos = "^1.63.0"
 myst-parser = "^2.0.0"
+qianfan = "^0.3.12"
+dashscope = "^1.19.1"
+anthropic = "^0.26.0"
 
 [tool.poetry.extras]
 log_ext = ["aliyun-log-python-sdk"]
diff --git a/sample_standard_app/app/core/agent/peer_agent_case/demo_executing_agent.yaml b/sample_standard_app/app/core/agent/peer_agent_case/demo_executing_agent.yaml
index 3a2fdb6f..fa2e29f7 100644
--- a/sample_standard_app/app/core/agent/peer_agent_case/demo_executing_agent.yaml
+++ b/sample_standard_app/app/core/agent/peer_agent_case/demo_executing_agent.yaml
@@ -5,7 +5,7 @@ profile:
   prompt_version: demo_executing_agent.cn
   llm_model:
     name: 'demo_llm'
-    model_name: 'gpt-4-turbo'
+    model_name: 'gpt-4o'
     temperature: 0.4
 plan:
   planner:
diff --git a/sample_standard_app/app/core/agent/rag_agent_case/demo_multillm_agent.yaml b/sample_standard_app/app/core/agent/rag_agent_case/demo_multillm_agent.yaml
new file mode 100644
index 00000000..07a9649d
--- /dev/null
+++ b/sample_standard_app/app/core/agent/rag_agent_case/demo_multillm_agent.yaml
@@ -0,0 +1,28 @@
+info:
+  name: 'demo_multillm_agent'
+  description: 'demo multillm agent'
+profile:
+  introduction: You are the ai assistant.
+  target: Your target is to answer the user's questions
+  instruction: |
+    Begin!
+
+    The question that needs to be answered is: {input}
+  llm_model:
+    name: 'kimi_llm'
+    model_name: 'moonshot-v1-8k'
+#    name: 'baichuan_llm'
+#    model_name: 'Baichuan2-Turbo'
+#    name: 'qwen_llm'
+#    model_name: 'qwen-turbo'
+#    name: 'wenxin_llm'
+#    model_name: 'ERNIE-3.5-8K'
+plan:
+  planner:
+    name: 'rag_planner'
+action:
+  tool:
+metadata:
+  type: 'AGENT'
+  module: 'sample_standard_app.app.core.agent.rag_agent_case.demo_rag_agent'
+  class: 'DemoRagAgent'
\ No newline at end of file
diff --git a/sample_standard_app/app/core/llm/baichuan_llm.yaml b/sample_standard_app/app/core/llm/baichuan_llm.yaml
new file mode 100644
index 00000000..ee1c5a93
--- /dev/null
+++ b/sample_standard_app/app/core/llm/baichuan_llm.yaml
@@ -0,0 +1,10 @@
+name: 'baichuan_llm'
+description: 'demo baichuan llm with spi'
+model_name: 'Baichuan2-Turbo'
+max_tokens: 1000
+api_key_name: 'BAICHUAN_API_KEY'
+api_base_name: 'BAICHUAN_API_BASE'
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.baichuan_openai_style_llm'
+  class: 'BAICHUANOpenAIStyleLLM'
\ No newline at end of file
diff --git a/sample_standard_app/app/core/llm/kimi_llm.yaml b/sample_standard_app/app/core/llm/kimi_llm.yaml
new file mode 100644
index 00000000..073b7dda
--- /dev/null
+++ b/sample_standard_app/app/core/llm/kimi_llm.yaml
@@ -0,0 +1,8 @@
+name: 'kimi_llm'
+description: 'demo kimi llm with spi'
+model_name: 'moonshot-v1-8k'
+max_tokens: 1000
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.kimi_openai_style_llm'
+  class: 'KIMIOpenAIStyleLLM'
\ No newline at end of file
diff --git a/sample_standard_app/app/core/llm/qwen_llm.yaml b/sample_standard_app/app/core/llm/qwen_llm.yaml
new file mode 100644
index 00000000..4d2e7a88
--- /dev/null
+++ b/sample_standard_app/app/core/llm/qwen_llm.yaml
@@ -0,0 +1,8 @@
+name: 'qwen_llm'
+description: 'demo qwen llm with spi'
+model_name: 'qwen-turbo'
+max_tokens: 1000
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.qwen_openai_style_llm'
+  class: 'QWenOpenAIStyleLLM'
\ No newline at end of file
diff --git a/sample_standard_app/app/core/llm/wenxin_llm.yaml b/sample_standard_app/app/core/llm/wenxin_llm.yaml
new file mode 100644
index 00000000..94c2fa03
--- /dev/null
+++ b/sample_standard_app/app/core/llm/wenxin_llm.yaml
@@ -0,0 +1,9 @@
+name: 'wenxin_llm'
+description: 'demo wenxin llm with spi'
+model_name: 'ERNIE-3.5-8K'
+max_tokens: 1000
+streaming: true
+metadata:
+  type: 'LLM'
+  module: 'agentuniverse.llm.default.wenxin_llm'
+  class: 'WenXinLLM'
\ No newline at end of file


Test patch:
diff --git a/sample_standard_app/app/test/test_wenxin_llm.py b/sample_standard_app/app/test/test_wenxin_llm.py
new file mode 100644
index 00000000..d24d465f
--- /dev/null
+++ b/sample_standard_app/app/test/test_wenxin_llm.py
@@ -0,0 +1,57 @@
+# !/usr/bin/env python3
+# -*- coding:utf-8 -*-
+
+# @Time    : 2024/5/22 16:25
+# @Author  : weizjajj 
+# @Email   : weizhongjie.wzj@antgroup.com
+# @FileName: test_wenxin_llm.py
+
+
+import asyncio
+import os
+import time
+import unittest
+
+from agentuniverse.base.agentuniverse import AgentUniverse
+from agentuniverse.llm.default.wenxin_llm import WenXinLLM
+from agentuniverse.llm.llm_manager import LLMManager
+
+
+class WenXinLLMTest(unittest.TestCase):
+    """Test cases for the reviewing agent"""
+
+    def setUp(self) -> None:
+        AgentUniverse().start(config_path='../../config/config.toml')
+
+    def test_reviewing_agent(self):
+        llm: WenXinLLM = LLMManager().get_instance_obj("default_baichuan_llm")
+        res = llm.call(
+            messages=[{"role": "user", "content": "你好"}],
+            streaming=True
+        )
+        print(res)
+        for item in res:
+            print(item)
+
+        langchain_llm = llm.as_langchain()
+        print(langchain_llm.invoke(input="你好"))
+        time.sleep(1)
+        asyncio.run(self.call_stream())
+
+    async def call_stream(self):
+        llm: WenXinLLM = LLMManager().get_instance_obj("default_qwen_llm")
+        res = await llm.acall(
+            messages=[{"role": "user", "content": "你好"}],
+            streaming=True
+        )
+        print(res)
+        async for item in res:
+            print(item)
+
+        langchain_llm = llm.as_langchain()
+        res = await langchain_llm.ainvoke(input="你好")
+        print(res)
+
+
+if __name__ == '__main__':
+    unittest.main()