aida agent (基础版)搭建完成
This commit is contained in:
31
app/service/fashion_agent/init_llm.py
Normal file
31
app/service/fashion_agent/init_llm.py
Normal file
@@ -0,0 +1,31 @@
|
||||
import os
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from langchain_qwq import ChatQwen
|
||||
|
||||
load_dotenv()
|
||||
|
||||
QWEN_API_KEY_INTL = os.environ.get("QWEN_API_KEY_INTL", "")
|
||||
|
||||
|
||||
def build_llm(enable_thinking: bool = False):
|
||||
llm = ChatQwen(
|
||||
model="qwen3.6-plus",
|
||||
timeout=None,
|
||||
max_retries=2,
|
||||
enable_thinking=enable_thinking,
|
||||
streaming=True,
|
||||
api_key=QWEN_API_KEY_INTL,
|
||||
)
|
||||
return llm
|
||||
|
||||
|
||||
qwen_plus_llm = ChatQwen(
|
||||
model="qwen-plus",
|
||||
timeout=None,
|
||||
max_retries=2,
|
||||
streaming=False,
|
||||
temperature=0.25,
|
||||
top_p=0.8,
|
||||
api_key=QWEN_API_KEY_INTL,
|
||||
)
|
||||
Reference in New Issue
Block a user