fixed edges logic
This commit is contained in:
parent
9a45d31481
commit
ae046f8d1a
1 changed files with 12 additions and 4 deletions
|
|
@ -452,16 +452,24 @@ class FlowsService:
|
|||
flow_json_str = re.sub(
|
||||
re.escape(old_llm_id), new_llm_id, flow_json_str
|
||||
)
|
||||
if old_llm_text_id:
|
||||
flow_json_str = re.sub(
|
||||
re.escape(old_llm_text_id), new_llm_text_id, flow_json_str
|
||||
)
|
||||
|
||||
flow_json_str = re.sub(
|
||||
re.escape(old_llm_id.split("-")[0]),
|
||||
new_llm_id.split("-")[0],
|
||||
flow_json_str,
|
||||
)
|
||||
|
||||
# Replace text LLM ID references (if applicable)
|
||||
if old_llm_text_id:
|
||||
flow_json_str = re.sub(
|
||||
re.escape(old_llm_text_id), new_llm_text_id, flow_json_str
|
||||
)
|
||||
|
||||
flow_json_str = re.sub(
|
||||
re.escape(old_llm_text_id.split("-")[0]),
|
||||
new_llm_text_id.split("-")[0],
|
||||
flow_json_str,
|
||||
)
|
||||
|
||||
# Convert back to JSON
|
||||
flow_data = json.loads(flow_json_str)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue