添加Golang、Java等项目的支持

This commit is contained in:
Your Name
2023-04-02 15:33:09 +08:00
parent 0c7378e096
commit b7e0a48cd2
6 changed files with 78 additions and 94 deletions

View File

@ -112,7 +112,8 @@ def predict_no_ui_long_connection(inputs, top_p, temperature, history=[], sys_pr
return result
def predict(inputs, top_p, temperature, chatbot=[], history=[], system_prompt='', stream = True, additional_fn=None):
def predict(inputs, top_p, temperature, chatbot=[], history=[], system_prompt='',
stream = True, additional_fn=None):
"""
发送至chatGPT流式获取输出。
用于基础的对话功能。
@ -243,11 +244,3 @@ def generate_payload(inputs, top_p, temperature, history, system_prompt, stream)
return headers,payload
if not LLM_MODEL.startswith('gpt'):
# 函数重载到另一个文件
from request_llm.bridge_tgui import predict_tgui, predict_tgui_no_ui
predict = predict_tgui
predict_no_ui = predict_tgui_no_ui
predict_no_ui_long_connection = predict_tgui_no_ui