-
Notifications
You must be signed in to change notification settings - Fork 0
/
FileDialog_save_assistant.gd
56 lines (37 loc) · 1.25 KB
/
FileDialog_save_assistant.gd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
extends FileDialog
@onready var file_dialog_save = $"."
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_file_dialog_save_file_selected(path):
print("saving")
pass
func get_save_dict():
var save_dict = {}
#
#var llm_tokens = $"../Node/HBoxContainer/TextEdit_tokens"
#var llm_temp = $"../Node/HBoxContainer/TextEdit_temp"
#var llm_fpnlty = $"../Node/HBoxContainer/TextEdit_f"
#var llm_ppnlty = $"../Node/HBoxContainer/TextEdit_p"
#
#
#var max_tokens = int(llm_tokens.text)
#var temperature = float(llm_temp.text)
#var frequency_penalty = float(llm_fpnlty.text)
#var presence_penalty = float(llm_ppnlty.text)
#
#save_dict.messages = $"../ButtonTest2".messages
save_dict.assistant = $"../VBoxContainer/TextEdit_LLM_AGENT".text
#
#save_dict.max_tokens = max_tokens
#save_dict.temperature = temperature
#save_dict.frequency_penalty = frequency_penalty
#save_dict.presence_penalty = presence_penalty
return save_dict
func _on_file_selected(path):
var save_file = FileAccess.open(path, FileAccess.WRITE)
var save_dict = {}
save_file.store_var(get_save_dict())