mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-17 15:35:21 +02:00
Update __init__.py
This commit is contained in:
parent
c43043fcc6
commit
b090a628a0
1 changed files with 3 additions and 3 deletions
|
|
@ -4,15 +4,15 @@ import voyager.utils as U
|
|||
|
||||
|
||||
def load_control_primitives(primitive_names=None):
|
||||
package_path = pkg_resources.resource_filename("voyager", "")
|
||||
package_path = pkg_resources.resource_filename("metagpt", "")
|
||||
if primitive_names is None:
|
||||
primitive_names = [
|
||||
primitives[:-3]
|
||||
for primitives in os.listdir(f"{package_path}/control_primitives")
|
||||
for primitives in os.listdir(f"{package_path}/actions/minecraft/control_primitives")
|
||||
if primitives.endswith(".js")
|
||||
]
|
||||
primitives = [
|
||||
U.load_text(f"{package_path}/control_primitives/{primitive_name}.js")
|
||||
U.load_text(f"{package_path}/actions/minecraft/control_primitives/{primitive_name}.js")
|
||||
for primitive_name in primitive_names
|
||||
]
|
||||
return primitives
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue