{"id":43975425,"url":"https://github.com/opyate/godot-llm-experiment","last_synced_at":"2026-02-07T08:08:35.188Z","repository":{"id":198844970,"uuid":"641444098","full_name":"opyate/godot-llm-experiment","owner":"opyate","description":"Getting an LLM to work with Godot. ","archived":false,"fork":false,"pushed_at":"2023-10-11T11:11:15.000Z","size":7396,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-10-11T17:03:08.492Z","etag":null,"topics":["gdextension","godot-engine","godot4","llamacpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opyate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-05-16T13:33:46.000Z","updated_at":"2023-10-11T15:23:16.000Z","dependencies_parsed_at":"2023-10-11T13:26:39.794Z","dependency_job_id":null,"html_url":"https://github.com/opyate/godot-llm-experiment","commit_stats":null,"previous_names":["opyate/godot-llm-experiment"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/opyate/godot-llm-experiment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opyate%2Fgodot-llm-experiment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opyate%2Fgodot-llm-experiment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opyate%2Fgodot-llm-experiment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opyate%2Fgodot-llm-experiment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opyate","download_url":"https://codeload.github.com/opyate/godot-llm-experiment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opyate%2Fgodot-llm-experiment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29189675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gdextension","godot-engine","godot4","llamacpp"],"created_at":"2026-02-07T08:08:34.200Z","updated_at":"2026-02-07T08:08:35.176Z","avatar_url":"https://github.com/opyate.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nTrying to integrate an LLM into Godot.\n\nFirst use-case: for spicing up NPC chatter.\n\n[Video](https://www.youtube.com/watch?v=qHVFi8tws7Q):\n\n[![Video](https://img.youtube.com/vi/qHVFi8tws7Q/0.jpg)](https://www.youtube.com/watch?v=qHVFi8tws7Q)\n\nScreenshot:\n\n![It works](docs/it_works.png)\n\n# Work log\n\nSee [docs/worklog.md](docs/worklog.md).\n\nLinux-only for now. (Mac and Windows folks, please send PRs!)\n\n# Quickstart\n\n```\nmkdir -p models\ncd models\nwget https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q5_K_M.gguf\ncd ..\n\ngit clone https://github.com/ggerganov/llama.cpp.git llama_dot_cpp\ngit clone https://github.com/godotengine/godot-cpp.git\n\ncp SConstruct-llamacpp llama_dot_cpp/SConstruct\ncd llama_dot_cpp\nscons -j31\ncd ..\n\ncd godot-cpp\ngit checkout godot-4.1.1-stable\ncp gdextension/extension_api.json ../the-game/extension_api.json\nscons platform=linux -j31 custom_api_file=$(pwd)/../the-game/extension_api.json\ncd ..\n\ncp llama_dot_cpp/libllama.so the-game/bin\n# build my gdextension here:\nscons platform=linux -j31\n\ncp models/mistral-7b-instruct-v0.1.Q5_K_M.gguf the-game/bin/\n# load the game in Godot\n```\n\nNote that if you run `scons -c` in the root, it will remove the built dependencies in `llama_dot_cpp`, so scons have to be run for the latter again for building the extension.\n\nSo, any future iterations look like this:\n\n```\nrm the-game/bin/*.so;  scons -c\n# make changes to the extension code\ncd llama_dot_cpp\nscons -j31\ncd ..\ncp llama_dot_cpp/libllama.so the-game/bin\nscons platform=linux -j31\n```\n\nOr\n\n```\nrm the-game/bin/libgdllm.linux.template_debug.x86_64.so\nrm src/*.os\nscons platform=linux -j31\n```\n\nIf any experts in scons/c++ reads this, I think the `SConstruct-llamacpp` step is probably unnecessary, and that I can get away with building llama.cpp using its own Makefile, and then just linking to the resulting `.a` file in the extension's `SConstruct` file. But I'm not sure how to do that.\n\n\n# Export\n\n```\ncd the-game\ngodot --export-debug \"Linux/X11\" godot-llm-experiment.x86_64\ncd ..\n```\n\n(I see [this](docs/export-log.txt) when I run the above command.)\n\nIt will run from here with `./godot-llm-experiment.x86_64`, because it's alongside the bin/ folder.\n\nTo run it standalone, outside of the context of the source/project files:\n\n```\nTMP=$(mktemp -d)\ncp the-game/godot-llm-experiment.x86_64 $TMP\ncp -R the-game/bin $TMP\ncd $TMP\n./godot-llm-experiment.x86_64\n```\n\nYou can now publish $TMP as a ZIP file.\n\n# Credits\n\n- Godot engine - https://godotengine.org/\n- image used in game is from https://growngaming.com/awesome/1st-gen-pokemon-sprites/\n- llama.cpp - https://github.com/ggerganov/llama.cpp\n- Mistral 7B LLM - https://mistral.ai/news/announcing-mistral-7b/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopyate%2Fgodot-llm-experiment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopyate%2Fgodot-llm-experiment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopyate%2Fgodot-llm-experiment/lists"}