fix type hint

This commit is contained in:
binary-husky
2024-05-21 13:18:38 +00:00
parent 8ca9232db2
commit d43175d46d
2 changed files with 2 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ from typing import List
class ArgProperty(BaseModel): # PLUGIN_ARG_MENU
title: str = Field(description="The title", default="")
description: str = Field(description="The description", default="")
default_value: str|float = Field(description="The default value", default="")
default_value: str = Field(description="The default value", default="")
type: str = Field(description="The type", default="") # currently we support ['string', 'dropdown']
options: List[str] = Field(default=[], description="List of options available for the argument") # only used when type is 'dropdown'

View File

@@ -90,7 +90,7 @@ def ArgsGeneralWrapper(f):
"""
def decorated(request: gradio.Request, cookies:dict, max_length:int, llm_model:str,
txt:str, txt2:str, top_p:float, temperature:float, chatbot:list,
history:list, system_prompt:str, plugin_advanced_arg:str|dict, *args):
history:list, system_prompt:str, plugin_advanced_arg:dict, *args):
txt_passon = txt
if txt == "" and txt2 != "": txt_passon = txt2
# 引入一个有cookie的chatbot