Skip to content

Commit e2969f8

Browse files
committed
restructure godot project
1 parent 8ab2eb4 commit e2969f8

File tree

8 files changed

+46
-51
lines changed

8 files changed

+46
-51
lines changed

godot/addons/godot-llama-cpp/autoloads/llama-backend.gd

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# This script will be autoloaded by the editor plugin
12
extends Node
23

34
var backend: LlamaBackend = LlamaBackend.new()

godot/autoloads/llama.tscn

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[gd_scene load_steps=2 format=3 uid="uid://bxobxniygk7jm"]
2+
3+
[ext_resource type="LlamaModel" path="res://models/stablelm-2-zephyr-1_6b-Q4_K_M.gguf" id="1_8pggd"]
4+
5+
[node name="LlamaContext" type="LlamaContext"]
6+
model = ExtResource("1_8pggd")

godot/icon.svg

-1
This file was deleted.

godot/icon.svg.import

-37
This file was deleted.

godot/main.gd

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ extends Node
22

33

44
# Called when the node enters the scene tree for the first time.
5-
func _ready() -> void:
6-
pass
5+
func _ready():
6+
pass # Replace with function body.
77

88

99
# Called every frame. 'delta' is the elapsed time since the previous frame.
10-
func _process(delta: float) -> void:
10+
func _process(delta):
1111
pass

godot/main.tscn

+35-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,42 @@
1-
[gd_scene load_steps=4 format=3 uid="uid://7oo8yj56scb1"]
1+
[gd_scene load_steps=3 format=3 uid="uid://7oo8yj56scb1"]
22

33
[ext_resource type="Texture2D" uid="uid://dplw232htshgc" path="res://addons/godot-llama-cpp/assets/godot-llama-cpp-1024x1024.svg" id="1_ojdoj"]
4-
[ext_resource type="Script" path="res://main.gd" id="1_wiuk3"]
5-
[ext_resource type="LlamaModel" path="res://models/stablelm-2-zephyr-1_6b-Q4_K_M.gguf" id="3_hnmbg"]
4+
[ext_resource type="Script" path="res://main.gd" id="1_vvrqe"]
65

7-
[node name="Node" type="Node"]
8-
script = ExtResource("1_wiuk3")
6+
[node name="Main" type="Node"]
7+
script = ExtResource("1_vvrqe")
98

10-
[node name="Sprite2D" type="Sprite2D" parent="."]
11-
position = Vector2(601, 325)
9+
[node name="Background" type="ColorRect" parent="."]
10+
anchors_preset = 15
11+
anchor_right = 1.0
12+
anchor_bottom = 1.0
13+
grow_horizontal = 2
14+
grow_vertical = 2
15+
color = Color(0.980392, 0.952941, 0.929412, 1)
16+
17+
[node name="GodotLlamaSprite" type="Sprite2D" parent="."]
18+
position = Vector2(578, 265)
1219
scale = Vector2(0.2, 0.2)
1320
texture = ExtResource("1_ojdoj")
1421

15-
[node name="LlamaContext" type="LlamaContext" parent="."]
16-
model = ExtResource("3_hnmbg")
22+
[node name="HBoxContainer" type="HBoxContainer" parent="."]
23+
visible = false
24+
anchors_preset = 7
25+
anchor_left = 0.5
26+
anchor_top = 1.0
27+
anchor_right = 0.5
28+
anchor_bottom = 1.0
29+
offset_left = -138.0
30+
offset_top = -180.0
31+
offset_right = 138.0
32+
offset_bottom = -42.0
33+
grow_horizontal = 2
34+
grow_vertical = 0
35+
alignment = 1
36+
37+
[node name="TextEdit" type="TextEdit" parent="HBoxContainer"]
38+
layout_mode = 2
39+
placeholder_text = "Ask me anything..."
40+
41+
[node name="Button" type="Button" parent="HBoxContainer"]
42+
layout_mode = 2

godot/models/.gitkeep

Whitespace-only changes.

godot/project.godot

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ config_version=5
1313
config/name="godot-llama-cpp"
1414
run/main_scene="res://main.tscn"
1515
config/features=PackedStringArray("4.2", "Forward Plus")
16-
config/icon="res://icon.svg"
1716

1817
[autoload]
1918

2019
__LlamaBackend="*res://addons/godot-llama-cpp/autoloads/llama-backend.gd"
20+
Llama="*res://autoloads/llama.tscn"
2121

2222
[editor_plugins]
2323

0 commit comments

Comments
 (0)