mirror of https://github.com/langgenius/dify.git
Merge branch 'main' into feat/end-user-oauth
This commit is contained in:
commit
68f195c5e9
|
|
@ -237,8 +237,7 @@ class IterationNode(LLMUsageTrackingMixin, Node):
|
|||
)
|
||||
)
|
||||
|
||||
# Update the total tokens from this iteration
|
||||
self.graph_runtime_state.total_tokens += graph_engine.graph_runtime_state.total_tokens
|
||||
# Accumulate usage from this iteration
|
||||
usage_accumulator[0] = self._merge_usage(
|
||||
usage_accumulator[0], graph_engine.graph_runtime_state.llm_usage
|
||||
)
|
||||
|
|
@ -265,7 +264,6 @@ class IterationNode(LLMUsageTrackingMixin, Node):
|
|||
datetime,
|
||||
list[GraphNodeEventBase],
|
||||
object | None,
|
||||
int,
|
||||
dict[str, VariableUnion],
|
||||
LLMUsage,
|
||||
]
|
||||
|
|
@ -292,7 +290,6 @@ class IterationNode(LLMUsageTrackingMixin, Node):
|
|||
iter_start_at,
|
||||
events,
|
||||
output_value,
|
||||
tokens_used,
|
||||
conversation_snapshot,
|
||||
iteration_usage,
|
||||
) = result
|
||||
|
|
@ -304,7 +301,6 @@ class IterationNode(LLMUsageTrackingMixin, Node):
|
|||
yield from events
|
||||
|
||||
# Update tokens and timing
|
||||
self.graph_runtime_state.total_tokens += tokens_used
|
||||
iter_run_map[str(index)] = (datetime.now(UTC).replace(tzinfo=None) - iter_start_at).total_seconds()
|
||||
|
||||
usage_accumulator[0] = self._merge_usage(usage_accumulator[0], iteration_usage)
|
||||
|
|
@ -336,7 +332,7 @@ class IterationNode(LLMUsageTrackingMixin, Node):
|
|||
item: object,
|
||||
flask_app: Flask,
|
||||
context_vars: contextvars.Context,
|
||||
) -> tuple[datetime, list[GraphNodeEventBase], object | None, int, dict[str, VariableUnion], LLMUsage]:
|
||||
) -> tuple[datetime, list[GraphNodeEventBase], object | None, dict[str, VariableUnion], LLMUsage]:
|
||||
"""Execute a single iteration in parallel mode and return results."""
|
||||
with preserve_flask_contexts(flask_app=flask_app, context_vars=context_vars):
|
||||
iter_start_at = datetime.now(UTC).replace(tzinfo=None)
|
||||
|
|
@ -363,7 +359,6 @@ class IterationNode(LLMUsageTrackingMixin, Node):
|
|||
iter_start_at,
|
||||
events,
|
||||
output_value,
|
||||
graph_engine.graph_runtime_state.total_tokens,
|
||||
conversation_snapshot,
|
||||
graph_engine.graph_runtime_state.llm_usage,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -140,7 +140,6 @@ class LoopNode(LLMUsageTrackingMixin, Node):
|
|||
|
||||
if reach_break_condition:
|
||||
loop_count = 0
|
||||
cost_tokens = 0
|
||||
|
||||
for i in range(loop_count):
|
||||
graph_engine = self._create_graph_engine(start_at=start_at, root_node_id=root_node_id)
|
||||
|
|
@ -163,9 +162,6 @@ class LoopNode(LLMUsageTrackingMixin, Node):
|
|||
# For other outputs, just update
|
||||
self.graph_runtime_state.set_output(key, value)
|
||||
|
||||
# Update the total tokens from this iteration
|
||||
cost_tokens += graph_engine.graph_runtime_state.total_tokens
|
||||
|
||||
# Accumulate usage from the sub-graph execution
|
||||
loop_usage = self._merge_usage(loop_usage, graph_engine.graph_runtime_state.llm_usage)
|
||||
|
||||
|
|
@ -194,7 +190,6 @@ class LoopNode(LLMUsageTrackingMixin, Node):
|
|||
pre_loop_output=self._node_data.outputs,
|
||||
)
|
||||
|
||||
self.graph_runtime_state.total_tokens += cost_tokens
|
||||
self._accumulate_usage(loop_usage)
|
||||
# Loop completed successfully
|
||||
yield LoopSucceededEvent(
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -74,8 +74,8 @@ const translation = {
|
|||
moreThanMaxLengthLine: 'Zeile {{rowIndex}}: {{varName}} Wert darf nicht mehr als {{maxLength}} Zeichen sein',
|
||||
atLeastOne: 'Bitte geben Sie mindestens eine Zeile in die hochgeladene Datei ein.',
|
||||
},
|
||||
executions: '{{num}} HINRICHTUNGEN',
|
||||
execution: 'AUSFÜHRUNG',
|
||||
execution: 'Ausführen',
|
||||
executions: '{{num}} Ausführungen',
|
||||
stopRun: 'Ausführung stoppen',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ const translation = {
|
|||
completionResult: 'Completion result',
|
||||
queryPlaceholder: 'Write your query content...',
|
||||
run: 'Execute',
|
||||
execution: 'EXECUTION',
|
||||
executions: '{{num}} EXECUTIONS',
|
||||
execution: 'Run',
|
||||
executions: '{{num}} runs',
|
||||
copy: 'Copy',
|
||||
resultTitle: 'AI Completion',
|
||||
noData: 'AI will give you what you want here.',
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ const translation = {
|
|||
moreThanMaxLengthLine: 'Fila {{rowIndex}}: el valor de {{varName}} no puede tener más de {{maxLength}} caracteres',
|
||||
atLeastOne: 'Por favor, ingresa al menos una fila en el archivo cargado.',
|
||||
},
|
||||
execution: 'EJECUCIÓN',
|
||||
executions: '{{num}} EJECUCIONES',
|
||||
execution: 'Ejecutar',
|
||||
executions: '{{num}} ejecuciones',
|
||||
stopRun: 'Detener ejecución',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ const translation = {
|
|||
moreThanMaxLengthLine: 'ردیف {{rowIndex}}: مقدار {{varName}} نمیتواند بیشتر از {{maxLength}} کاراکتر باشد',
|
||||
atLeastOne: 'لطفاً حداقل یک ردیف در فایل بارگذاری شده وارد کنید.',
|
||||
},
|
||||
executions: '{{num}} اعدام',
|
||||
execution: 'اجرا',
|
||||
executions: '{{num}} بار اجرا',
|
||||
stopRun: 'توقف اجرا',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ const translation = {
|
|||
moreThanMaxLengthLine: 'Row {{rowIndex}}: {{varName}} value can not be more than {{maxLength}} characters',
|
||||
atLeastOne: 'Veuillez entrer au moins une ligne dans le fichier téléchargé.',
|
||||
},
|
||||
executions: '{{num}} EXÉCUTIONS',
|
||||
execution: 'EXÉCUTION',
|
||||
execution: 'Exécuter',
|
||||
executions: '{{num}} exécutions',
|
||||
stopRun: 'Arrêter l\'exécution',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ const translation = {
|
|||
'रॉ {{rowIndex}}: {{varName}} मान {{maxLength}} वर्णों से अधिक नहीं हो सकता',
|
||||
atLeastOne: 'कृपया अपलोड की गई फ़ाइल में कम से कम एक पंक्ति भरें।',
|
||||
},
|
||||
execution: 'अनु执行',
|
||||
executions: '{{num}} फाँसी',
|
||||
execution: 'चलाएं',
|
||||
executions: '{{num}} बार चलाएं',
|
||||
stopRun: 'निष्पादन रोकें',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,8 @@ const translation = {
|
|||
},
|
||||
field: 'Kebun',
|
||||
queryTitle: 'Kueri konten',
|
||||
execution: 'EKSEKUSI',
|
||||
execution: 'Jalankan',
|
||||
executions: '{{num}} kali dijalankan',
|
||||
copy: 'Menyalin',
|
||||
title: 'Penyelesaian AI',
|
||||
downloadTemplate: 'Unduh templat di sini',
|
||||
|
|
|
|||
|
|
@ -76,8 +76,8 @@ const translation = {
|
|||
'Riga {{rowIndex}}: il valore di {{varName}} non può essere superiore a {{maxLength}} caratteri',
|
||||
atLeastOne: 'Per favore inserisci almeno una riga nel file caricato.',
|
||||
},
|
||||
execution: 'ESECUZIONE',
|
||||
executions: '{{num}} ESECUZIONI',
|
||||
execution: 'Esegui',
|
||||
executions: '{{num}} esecuzioni',
|
||||
stopRun: 'Ferma l\'esecuzione',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ const translation = {
|
|||
completionResult: '生成結果',
|
||||
queryPlaceholder: '入力してください',
|
||||
run: '実行',
|
||||
execution: '処理中',
|
||||
execution: '実行',
|
||||
executions: '{{num}}回実行',
|
||||
copy: 'コピー',
|
||||
resultTitle: 'AI 生成結果',
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ const translation = {
|
|||
atLeastOne: '업로드된 파일에는 적어도 한 줄의 입력이 필요합니다.',
|
||||
},
|
||||
execution: '실행',
|
||||
executions: '{{num}} 처형',
|
||||
executions: '{{num}}회 실행',
|
||||
stopRun: '실행 중지',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -75,8 +75,8 @@ const translation = {
|
|||
atLeastOne:
|
||||
'Proszę wprowadź co najmniej jeden wiersz w załadowanym pliku.',
|
||||
},
|
||||
executions: '{{num}} EGZEKUCJI',
|
||||
execution: 'WYKONANIE',
|
||||
execution: 'Uruchom',
|
||||
executions: '{{num}} uruchomień',
|
||||
stopRun: 'Zatrzymaj wykonanie',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ const translation = {
|
|||
moreThanMaxLengthLine: 'Linha {{rowIndex}}: o valor de {{varName}} não pode ter mais de {{maxLength}} caracteres',
|
||||
atLeastOne: 'Por favor, insira pelo menos uma linha no arquivo enviado.',
|
||||
},
|
||||
executions: '{{num}} EXECUÇÕES',
|
||||
execution: 'EXECUÇÃO',
|
||||
execution: 'Executar',
|
||||
executions: '{{num}} execuções',
|
||||
stopRun: 'Parar execução',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ const translation = {
|
|||
moreThanMaxLengthLine: 'Rândul {{rowIndex}}: valoarea {{varName}} nu poate avea mai mult de {{maxLength}} caractere',
|
||||
atLeastOne: 'Vă rugăm să introduceți cel puțin un rând în fișierul încărcat.',
|
||||
},
|
||||
execution: 'EXECUȚIE',
|
||||
executions: '{{num}} EXECUȚII',
|
||||
execution: 'Rulare',
|
||||
executions: '{{num}} rulări',
|
||||
stopRun: 'Oprește execuția',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ const translation = {
|
|||
moreThanMaxLengthLine: 'Строка {{rowIndex}}: значение {{varName}} не может превышать {{maxLength}} символов',
|
||||
atLeastOne: 'Пожалуйста, введите хотя бы одну строку в загруженный файл.',
|
||||
},
|
||||
execution: 'ИСПОЛНЕНИЕ',
|
||||
executions: '{{num}} ВЫПОЛНЕНИЯ',
|
||||
execution: 'Запуск',
|
||||
executions: '{{num}} запусков',
|
||||
stopRun: 'Остановить выполнение',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ const translation = {
|
|||
moreThanMaxLengthLine: 'Vrstica {{rowIndex}}: vrednost {{varName}} ne sme biti daljša od {{maxLength}} znakov',
|
||||
atLeastOne: 'Prosimo, vnesite vsaj eno vrstico v naloženo datoteko.',
|
||||
},
|
||||
execution: 'IZVEDBA',
|
||||
executions: '{{num}} IZVRŠITEV',
|
||||
execution: 'Zagon',
|
||||
executions: '{{num}} zagonov',
|
||||
stopRun: 'Ustavi izvajanje',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ const translation = {
|
|||
atLeastOne: 'โปรดป้อนอย่างน้อยหนึ่งแถวในไฟล์ที่อัปโหลด',
|
||||
},
|
||||
execution: 'การดำเนินการ',
|
||||
executions: '{{num}} การประหารชีวิต',
|
||||
executions: '{{num}} ครั้งที่รัน',
|
||||
stopRun: 'หยุดการทำงาน',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ const translation = {
|
|||
moreThanMaxLengthLine: 'Satır {{rowIndex}}: {{varName}} değeri {{maxLength}} karakterden fazla olamaz',
|
||||
atLeastOne: 'Lütfen yüklenen dosyada en az bir satır girin.',
|
||||
},
|
||||
execution: 'İFRAZAT',
|
||||
executions: '{{num}} İDAM',
|
||||
execution: 'Çalıştır',
|
||||
executions: '{{num}} çalıştırma',
|
||||
stopRun: 'Çalışmayı durdur',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ const translation = {
|
|||
moreThanMaxLengthLine: 'Рядок {{rowIndex}}: значення {{varName}} не може містити більше {{maxLength}} символів',
|
||||
atLeastOne: 'Будь ласка, введіть принаймні один рядок у завантажений файл.',
|
||||
},
|
||||
execution: 'ВИКОНАННЯ',
|
||||
executions: '{{num}} ВИКОНАНЬ',
|
||||
execution: 'Запуск',
|
||||
executions: '{{num}} запусків',
|
||||
stopRun: 'Зупинити виконання',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ const translation = {
|
|||
moreThanMaxLengthLine: 'Dòng {{rowIndex}}: {{varName}} không thể chứa quá {{maxLength}} ký tự',
|
||||
atLeastOne: 'Vui lòng nhập ít nhất một dòng vào tệp đã tải lên.',
|
||||
},
|
||||
executions: '{{num}} ÁN TỬ HÌNH',
|
||||
execution: 'THI HÀNH',
|
||||
execution: 'Chạy',
|
||||
executions: '{{num}} lần chạy',
|
||||
stopRun: 'Dừng thực thi',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ const translation = {
|
|||
atLeastOne: '上傳檔案的內容不能少於一條',
|
||||
},
|
||||
execution: '執行',
|
||||
executions: '{{num}} 執行',
|
||||
executions: '{{num}} 次執行',
|
||||
stopRun: '停止運行',
|
||||
},
|
||||
login: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue