0.1.202
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user