通义千问 api-key 替换

This commit is contained in:
2024-07-18 17:45:36 +08:00
parent 4039d3c5de
commit b92b1f7d6e
2 changed files with 6 additions and 3 deletions

View File

@@ -107,7 +107,8 @@ qwen = QWenCallbackHandler()
def search_from_internet(message):
response = Generation.call(
model='qwen-turbo',
api_key='sk-7658298c6b99443c98184a5e634fe6ab',
# api_key='sk-7658298c6b99443c98184a5e634fe6ab',
api_key='sk-a6bdf594e1f54a4aa3e9d4d48f8c661f',
messages=message,
tools=tools,
# seed=random.randint(1, 10000), # 设置随机数种子seed如果没有设置则随机数种子默认为1234
@@ -129,7 +130,8 @@ def query_database(sql_string):
def get_response(messages):
response = Generation.call(
model='qwen-max',
api_key='sk-7658298c6b99443c98184a5e634fe6ab',
# api_key='sk-7658298c6b99443c98184a5e634fe6ab',
api_key='sk-a6bdf594e1f54a4aa3e9d4d48f8c661f',
messages=messages,
tools=tools,
# seed=random.randint(1, 10000), # 设置随机数种子seed如果没有设置则随机数种子默认为1234

View File

@@ -48,7 +48,8 @@ def translate_to_en(text):
def get_response(messages):
response = Generation.call(
model='qwen-max',
api_key='sk-7658298c6b99443c98184a5e634fe6ab',
# api_key='sk-7658298c6b99443c98184a5e634fe6ab',
api_key='sk-a6bdf594e1f54a4aa3e9d4d48f8c661f',
messages=messages,
# seed=random.randint(1, 10000), # 设置随机数种子seed如果没有设置则随机数种子默认为1234
result_format='message', # 将输出设置为message形式