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]
# replace with your username:
name = guan
version = 0.1.143
version = 0.1.144
author = guanjihuan
author_email = guanjihuan@163.com
description = An open source python package

View File

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

View File

@ -61,13 +61,13 @@ def chat(prompt='你好', stream=1, model=1):
return response
# 加上函数代码的 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
function_source = guan.get_source(function_name)
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:
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
# 机器人自动对话