This commit is contained in:
guanjihuan 2025-02-20 05:39:30 +08:00
parent dfeb15c963
commit e171790a15
3 changed files with 5 additions and 5 deletions

View File

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

View File

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

View File

@ -61,13 +61,13 @@ def chat(prompt='你好', stream=1, model=1):
return response return response
# 加上函数代码的 AI 对话 # 加上函数代码的 AI 对话
def chat_with_function_code(function_name, prompt='', stream=1, model=1, top_p=0.8, temperature=0.85): def chat_with_function_code(function_name, prompt='', stream=1, model=1):
import guan import guan
function_source = guan.get_source(function_name) function_source = guan.get_source(function_name)
if prompt == '': if prompt == '':
response = guan.chat(prompt=function_source, stream=stream, model=model, top_p=top_p, temperature=temperature) response = guan.chat(prompt=function_source, stream=stream, model=model)
else: else:
response = guan.chat(prompt=function_source+'\n\n'+prompt, stream=stream, model=model, top_p=top_p, temperature=temperature) response = guan.chat(prompt=function_source+'\n\n'+prompt, stream=stream, model=model)
return response return response
# 机器人自动对话 # 机器人自动对话