MCPcopy
hub / github.com/1Panel-dev/MaxKB / pop

Method pop

apps/application/flow/workflow_manage.py:67–89  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 return self.node_chunk_list.__contains__(node_chunk)
66
67 def pop(self):
68 if self.current_node_chunk is None:
69 try:
70 current_node_chunk = self.node_chunk_list.pop(0)
71 self.current_node_chunk = current_node_chunk
72 except IndexError as e:
73 pass
74 if self.current_node_chunk is not None:
75 try:
76 chunk = self.current_node_chunk.chunk_list.pop(0)
77 return chunk
78 except IndexError as e:
79 if self.current_node_chunk.is_end():
80 self.current_node_chunk = None
81 if self.work_flow.answer_is_not_empty():
82 chunk = self.work_flow.base_to_response.to_stream_chunk_response(
83 self.work_flow.params['chat_id'],
84 self.work_flow.params['chat_record_id'],
85 '\n\n', False, 0, 0)
86 self.work_flow.append_answer('\n\n')
87 return chunk
88 return self.pop()
89 return None
90
91
92class WorkflowManage:

Callers 15

get_re_password_detailsFunction · 0.45
editMethod · 0.45
handle_task_endMethod · 0.45
executeMethod · 0.45
export_knowledgeMethod · 0.45
import_knowledgeMethod · 0.45
save_imageMethod · 0.45
save_imageMethod · 0.45
invokeMethod · 0.45
new_instanceMethod · 0.45
build_extraMethod · 0.45
new_instanceMethod · 0.45

Calls 4

is_endMethod · 0.80
answer_is_not_emptyMethod · 0.80
append_answerMethod · 0.45

Tested by

no test coverage detected