mirror of
https://github.com/OpenBMB/ChatDev.git
synced 2026-04-25 19:28:09 +00:00
fix multi-model support
This commit is contained in:
parent
8f5c68ab1c
commit
f44e91dd16
6
graph.py
6
graph.py
@ -264,7 +264,7 @@ class Graph:
|
||||
if len(line) == 1: # In case there is only one layer
|
||||
for node_id in range(line[0][0][0], line[0][0][1] + 1):
|
||||
if node_id not in self.nodes:
|
||||
self.add_node(Node(node_id))
|
||||
self.add_node(Node(node_id), model=self.config.get("Model"))
|
||||
for i in range(len(line) - 1):
|
||||
from_node_list = line[i]
|
||||
to_node_list = line[i + 1]
|
||||
@ -273,9 +273,9 @@ class Graph:
|
||||
for to_node_tuple in to_node_list:
|
||||
for to_node_id in range(to_node_tuple[0], to_node_tuple[1] + 1):
|
||||
if from_node_id not in self.nodes:
|
||||
self.add_node(Node(from_node_id))
|
||||
self.add_node(Node(from_node_id), model=self.config.get("Model"))
|
||||
if to_node_id not in self.nodes:
|
||||
self.add_node(Node(to_node_id))
|
||||
self.add_node(Node(to_node_id), model=self.config.get("Model"))
|
||||
self.add_edge(from_node_id, to_node_id)
|
||||
self.input_layer = self.get_input_layer()
|
||||
self.output_layer = self.get_output_layer()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user