This commit is contained in:
2026-03-16 12:50:33 +08:00
parent 752fc921a5
commit 5d0f629439
3 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
[metadata]
# replace with your username:
name = guan
version = 0.1.201
version = 0.1.202
author = guanjihuan
author_email = guanjihuan@163.com
description = An open source python package

View File

@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: guan
Version: 0.1.201
Version: 0.1.202
Summary: An open source python package
Home-page: https://py.guanjihuan.com
Author: guanjihuan

View File

@@ -85,6 +85,7 @@ def openai_chat(prompt="你好", model="qwen-plus", temperature=0.7, system_mess
messages=messages,
temperature=temperature,
stream=True,
extra_body={"enable_thinking": False},
)
response = ''
for chunk in completion:
@@ -100,7 +101,6 @@ def openai_chat(prompt="你好", model="qwen-plus", temperature=0.7, system_mess
# 通过 LangChain 加载模型(需要 API Key)
def load_langchain_model(model="qwen-plus", temperature=0.7, load_env=1):
from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate
import os
if load_env:
import dotenv