feat:更新智能体架构
This commit is contained in:
11
agent/bill.py
Normal file
11
agent/bill.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from langchain.agents import create_agent
|
||||
|
||||
from agent.model import model
|
||||
from prompt.bill import bill_prompt
|
||||
from tools.bill import bill_search
|
||||
|
||||
bill_agent = create_agent(
|
||||
model=model,
|
||||
tools=[bill_search],
|
||||
system_prompt=bill_prompt
|
||||
)
|
||||
22
agent/model.py
Normal file
22
agent/model.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from langchain.chat_models import init_chat_model
|
||||
|
||||
# model = init_chat_model(
|
||||
# model="glm-5.1",
|
||||
# model_provider="openai",
|
||||
# base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
|
||||
# api_key="sk-52bcd98e9c1d45908437c4e8706eefff"
|
||||
# )
|
||||
|
||||
# model = init_chat_model(
|
||||
# model="GLM-5-Turbo",
|
||||
# model_provider="openai",
|
||||
# base_url="https://open.bigmodel.cn/api/coding/paas/v4",
|
||||
# api_key="ea3f96fd542f4bab805a719cf3063cd6.HCRhCV7nqwkDsVKm",
|
||||
# )
|
||||
|
||||
model = init_chat_model(
|
||||
model="deepseek-v4-flash",
|
||||
model_provider="openai",
|
||||
base_url="https://api.deepseek.com",
|
||||
api_key="sk-0b237d41f6bc44fc9732ea66bd7eade0"
|
||||
)
|
||||
Reference in New Issue
Block a user