wwf
2 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import type { WorkflowProcess } from '@/app/components/base/chat/types'
import { WorkflowRunningStatus } from '@/app/components/workflow/types'
 
export const mockedWorkflowProcess = {
  status: WorkflowRunningStatus.Succeeded,
  resultText: 'Hello, how can I assist you today?',
  tracing: [
    {
      extras: {},
      id: 'f6337dc9-e280-4915-965f-10b0552dd917',
      node_id: '1724232060789',
      node_type: 'start',
      title: 'Start',
      index: 1,
      predecessor_node_id: null,
      inputs: {
        'sys.query': 'hi',
        'sys.files': [],
        'sys.conversation_id': '92ce0a3e-8f15-43d1-b31d-32716c4b10a7',
        'sys.user_id': 'fbff43f9-d5a4-4e85-b63b-d3a91d806c6f',
        'sys.dialogue_count': 1,
        'sys.app_id': 'b2e8906a-aad3-43a0-9ace-0e44cc7315e1',
        'sys.workflow_id': '70004abe-561f-418b-b9e8-8c957ce55140',
        'sys.workflow_run_id': '69db9267-aaee-42e1-9581-dbfb67e8eeb5',
      },
      process_data: null,
      outputs: {
        'sys.query': 'hi',
        'sys.files': [],
        'sys.conversation_id': '92ce0a3e-8f15-43d1-b31d-32716c4b10a7',
        'sys.user_id': 'fbff43f9-d5a4-4e85-b63b-d3a91d806c6f',
        'sys.dialogue_count': 1,
        'sys.app_id': 'b2e8906a-aad3-43a0-9ace-0e44cc7315e1',
        'sys.workflow_id': '70004abe-561f-418b-b9e8-8c957ce55140',
        'sys.workflow_run_id': '69db9267-aaee-42e1-9581-dbfb67e8eeb5',
      },
      status: 'succeeded',
      error: null,
      elapsed_time: 0.035744,
      execution_metadata: null,
      created_at: 1728980002,
      finished_at: 1728980002,
      files: [],
      parallel_id: null,
      parallel_start_node_id: null,
      parent_parallel_id: null,
      parent_parallel_start_node_id: null,
      iteration_id: null,
    },
    {
      extras: {},
      id: '92204d8d-4198-4c46-aa02-c2754b11dec9',
      node_id: 'llm',
      node_type: 'llm',
      title: 'LLM',
      index: 2,
      predecessor_node_id: '1724232060789',
      inputs: null,
      process_data: {
        model_mode: 'chat',
        prompts: [
          {
            role: 'system',
            text: 'hi',
            files: [],
          },
          {
            role: 'user',
            text: 'hi',
            files: [],
          },
        ],
        model_provider: 'openai',
        model_name: 'gpt-4o-mini',
      },
      outputs: {
        text: 'Hello! How can I assist you today?',
        usage: {
          prompt_tokens: 13,
          prompt_unit_price: '0.15',
          prompt_price_unit: '0.000001',
          prompt_price: '0.0000020',
          completion_tokens: 9,
          completion_unit_price: '0.60',
          completion_price_unit: '0.000001',
          completion_price: '0.0000054',
          total_tokens: 22,
          total_price: '0.0000074',
          currency: 'USD',
          latency: 1.8902503330027685,
        },
        finish_reason: 'stop',
      },
      status: 'succeeded',
      error: null,
      elapsed_time: 5.089409,
      execution_metadata: {
        total_tokens: 22,
        total_price: '0.0000074',
        currency: 'USD',
      },
      created_at: 1728980002,
      finished_at: 1728980007,
      files: [],
      parallel_id: null,
      parallel_start_node_id: null,
      parent_parallel_id: null,
      parent_parallel_start_node_id: null,
      iteration_id: null,
    },
    {
      extras: {},
      id: '7149bac6-60f9-4e06-a5ed-1d9d3764c06b',
      node_id: 'answer',
      node_type: 'answer',
      title: 'Answer',
      index: 3,
      predecessor_node_id: 'llm',
      inputs: null,
      process_data: null,
      outputs: {
        answer: 'Hello! How can I assist you today?',
      },
      status: 'succeeded',
      error: null,
      elapsed_time: 0.015339,
      execution_metadata: null,
      created_at: 1728980007,
      finished_at: 1728980007,
      parallel_id: null,
      parallel_start_node_id: null,
      parent_parallel_id: null,
      parent_parallel_start_node_id: null,
    },
  ],
} as unknown as WorkflowProcess