Przeglądaj źródła

Remove redundant from_variable_selector null-check (#24842)

tags/1.8.1
Yongtao Huang 2 miesięcy temu
rodzic
commit
72acd9b483
No account linked to committer's email address

+ 0
- 3
api/core/workflow/nodes/answer/answer_stream_processor.py Wyświetl plik

return [] return []


stream_output_value_selector = event.from_variable_selector stream_output_value_selector = event.from_variable_selector
if not stream_output_value_selector:
return []

stream_out_answer_node_ids = [] stream_out_answer_node_ids = []
for answer_node_id, route_position in self.route_position.items(): for answer_node_id, route_position in self.route_position.items():
if answer_node_id not in self.rest_node_ids: if answer_node_id not in self.rest_node_ids:

+ 2
- 2
web/app/components/app/configuration/config/automatic/get-automatic-res.tsx Wyświetl plik

import Modal from '@/app/components/base/modal' import Modal from '@/app/components/base/modal'
import Button from '@/app/components/base/button' import Button from '@/app/components/base/button'
import Toast from '@/app/components/base/toast' import Toast from '@/app/components/base/toast'
import { generateBasicAppFistTimeRule, generateRule } from '@/service/debug'
import { generateBasicAppFirstTimeRule, generateRule } from '@/service/debug'
import type { CompletionParams, Model } from '@/types/app' import type { CompletionParams, Model } from '@/types/app'
import type { AppType } from '@/types/app' import type { AppType } from '@/types/app'
import Loading from '@/app/components/base/loading' import Loading from '@/app/components/base/loading'
let apiRes: GenRes let apiRes: GenRes
let hasError = false let hasError = false
if (isBasicMode || !currentPrompt) { if (isBasicMode || !currentPrompt) {
const { error, ...res } = await generateBasicAppFistTimeRule({
const { error, ...res } = await generateBasicAppFirstTimeRule({
instruction, instruction,
model_config: model, model_config: model,
no_variable: false, no_variable: false,

+ 1
- 1
web/service/debug.ts Wyświetl plik

}) })
} }


export const generateBasicAppFistTimeRule = (body: Record<string, any>) => {
export const generateBasicAppFirstTimeRule = (body: Record<string, any>) => {
return post<BasicAppFirstRes>('/rule-generate', { return post<BasicAppFirstRes>('/rule-generate', {
body, body,
}) })

Ładowanie…
Anuluj
Zapisz