mirror of
https://github.com/langgenius/dify.git
synced 2026-06-22 19:21:13 +08:00
Co-authored-by: WH-2099 <wh2099@pm.me>
This commit is contained in:
parent
43192036fa
commit
0fa43973b8
@ -118,7 +118,7 @@ class BaseAgentRunner(AppRunner):
|
||||
features = model_schema.features if model_schema and model_schema.features else []
|
||||
self.stream_tool_call = ModelFeature.STREAM_TOOL_CALL in features
|
||||
self.files = application_generate_entity.files if ModelFeature.VISION in features else []
|
||||
self.query: str | None = ""
|
||||
self.query: str = ""
|
||||
self._current_thoughts: list[PromptMessage] = []
|
||||
|
||||
def _repack_app_generate_entity(
|
||||
|
||||
@ -241,7 +241,7 @@ class WorkflowFinishStreamResponse(StreamResponse):
|
||||
created_by: Mapping[str, object] = Field(default_factory=dict)
|
||||
created_at: int
|
||||
finished_at: int | None
|
||||
exceptions_count: int | None = 0
|
||||
exceptions_count: int = 0
|
||||
files: Sequence[Mapping[str, Any]] | None = []
|
||||
|
||||
event: StreamEvent = StreamEvent.WORKFLOW_FINISHED
|
||||
|
||||
@ -113,7 +113,7 @@ class CustomModelConfiguration(BaseModel):
|
||||
current_credential_id: str | None = None
|
||||
current_credential_name: str | None = None
|
||||
available_model_credentials: list[CredentialConfiguration] = []
|
||||
unadded_to_model_list: bool | None = False
|
||||
unadded_to_model_list: bool = False
|
||||
|
||||
# pydantic configs
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
@ -209,7 +209,7 @@ class ProviderConfig(BasicProviderConfig):
|
||||
required: bool = False
|
||||
default: Union[int, str, float, bool] | None = None
|
||||
options: list[Option] | None = None
|
||||
multiple: bool | None = False
|
||||
multiple: bool = False
|
||||
label: I18nObject | None = None
|
||||
help: I18nObject | None = None
|
||||
url: str | None = None
|
||||
|
||||
@ -73,7 +73,7 @@ class RequestInvokeLLM(BaseRequestInvokeModel):
|
||||
prompt_messages: list[PromptMessage] = Field(default_factory=list)
|
||||
tools: list[PromptMessageTool] | None = Field(default_factory=list[PromptMessageTool])
|
||||
stop: list[str] | None = Field(default_factory=list[str])
|
||||
stream: bool | None = False
|
||||
stream: bool = False
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
@ -46,8 +46,8 @@ class EventParameter(BaseModel):
|
||||
)
|
||||
template: PluginParameterTemplate | None = Field(default=None, description="The template of the parameter")
|
||||
scope: str | None = None
|
||||
required: bool | None = False
|
||||
multiple: bool | None = Field(
|
||||
required: bool = False
|
||||
multiple: bool = Field(
|
||||
default=False,
|
||||
description="Whether the parameter is multiple select, only valid for select or dynamic-select type",
|
||||
)
|
||||
|
||||
@ -1238,7 +1238,7 @@ export type CustomModelConfiguration = {
|
||||
current_credential_name?: string | null
|
||||
model: string
|
||||
model_type: ModelType
|
||||
unadded_to_model_list?: boolean | null
|
||||
unadded_to_model_list?: boolean
|
||||
}
|
||||
|
||||
export type CredentialFormSchema = {
|
||||
|
||||
@ -1531,7 +1531,7 @@ export const zCustomModelConfiguration = z.object({
|
||||
current_credential_name: z.string().nullish(),
|
||||
model: z.string(),
|
||||
model_type: zModelType,
|
||||
unadded_to_model_list: z.boolean().nullish().default(false),
|
||||
unadded_to_model_list: z.boolean().optional().default(false),
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user