MineDojo / Voyager

An Open-Ended Embodied Agent with Large Language Models
https://voyager.minedojo.org/
MIT License
5.53k stars 512 forks source link

Issues with building and running on Minecraft Launcher #2

Closed pranitl closed 1 year ago

pranitl commented 1 year ago

I used gradle build command (not gradlew build as the readme said) and i keep getting an error around

Build file '/Users/XYZ/Downloads/better-respawn-1.19/fabric/build.gradle' line: 155

which is the classifier 'shadow-dev' down below

shadowJar {
    configurations = [project.configurations.shadow]
    classifier 'shadow-dev'
    relocate 'de.maxhenkel.configbuilder', "de.maxhenkel.betterrespawn.configbuilder"
}

How do i solve this?

Also, is there a way to adapt the installation file to account for Minecraft Launcher and not azure:

from voyager import Voyager

# you can also use mc_port instead of azure_login, but azure_login is highly recommended
azure_login = {
    "client_id": "YOUR_CLIENT_ID",
    "redirect_url": "https://127.0.0.1/auth-response",
    "secret_value": "[OPTIONAL] YOUR_SECRET_VALUE",
    "version": "fabric-loader-0.14.18-1.19", # the version Voyager is tested on
}
openai_api_key = "YOUR_API_KEY"

voyager = Voyager(
    azure_login=azure_login,
    openai_api_key=openai_api_key,
)

# start lifelong learning
voyager.learn()
youmustfight commented 1 year ago

For the first, your Java Runtime Environment may not be the right version, I had to install v17 to get the build to work.

For the second question, you can do the mc_port param instead even though advise against that because you can get stuck in endless loops.

voyager = Voyager(
    # azure_login=azure_login,
    mc_port=12345, # <- whatever port integer that gets displayed when you open to LAN
    openai_api_key=openai_api_key
)

Also, be sure after you've started the server and you're opening it to LAN, to keep that option on 'Survival'. I set it to creative mode as well at first but then items didn't drop when the bot broke trees/stone/etc.

pranitl commented 1 year ago

Thank you for both! I tried updating the runtime and I pasted the issue into GPT-4 and it said i need to update the shadowJar function in build.gradle file i was having errors with to the following:

shadowJar {
    configurations = [project.configurations.shadow]
    archiveClassifier.set('shadow-dev')
    relocate 'de.maxhenkel.configbuilder', "de.maxhenkel.betterrespawn.configbuilder"
}

After doing so and ensuring I have the right version installed of the installer, it worked!

Now having issues actually running the python script because it keeps telling me voyager isn't installed even though i had gone through the initial set up. Any tips there?

xieleo5 commented 1 year ago

Hi, @rasterize-art Thank you for your interest in this project! Regarding the Java compilation, you might consider using gradlew build instead of gradle build. When you use gradle build, it utilizes the locally installed Gradle version on your computer, which may not be the correct one. In the repository, there should be a file called gradlew—simply execute that to successfully build the mod. Regarding the python installation. How did you install the package? You should use pip install -e . under the main folder and then you should be able to import Voyager

Anonym0us33 commented 1 year ago

I had to use 3 f'ing gpt4 copilot calls to get this solved plus a bunch of regular perplexity calls. Now I can't use gpt4 for another 4 hours but it solved itself.

basically install jdk17 and use set JAVA_HOME=C:\Program Files\Java\jdk-17\ but also input C:\Program Files\Java\jdk-17\bin to my %PATH% I didn't need help doing that but you can ask gpt/google sensei if you need reminding.

The first 2 times it just gave java errors. Then after the 3rd time restarting cmd it gave the green message. After that I just changed the fabric version from fabric-loader-0.14.21-1.19.4 to fabric-loader-0.14.21-1.19 by re-running the .exe

now I'm getting errors when running voyager = Voyager( mc_port = mc_port , openai_api_key=openai_api_key) voyager.learn() warnings.warn(f"Subprocess {self.name} failed to start.")

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.