You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
812 B

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2025/4/17 15:28
# @Author : old-tom
# @File : __init__.py
# @Project : reActLLMDemo
# @Desc :
from langchain_openai import ChatOpenAI
from llmagent.llm_config import LLMConfigLoader
from llmagent.llm_config import base_conf
from llmtools.tool_impl import tools
# 初始化LLM模型
llm_conf = LLMConfigLoader.load(item_name=base_conf.model_form)
llm = ChatOpenAI(
model=llm_conf.model, api_key=llm_conf.api_key,
base_url=llm_conf.base_url, max_tokens=llm_conf.max_tokens,
temperature=llm_conf.temperature,
streaming=llm_conf.streaming
)
# 绑定工具
llm_with_tools = llm.bind_tools(tools)
# 提示词模版
PROMPT_TEMPLATE = {
'SMART_ASSISTANT': {
'description': '智能助手',
'template': """"""
}
}