added translations
This commit is contained in:
@@ -8,7 +8,7 @@ var _pending_user_text := ""
|
||||
var _chat_history: Array[Dictionary] = []
|
||||
var _saved_state_blob := PackedByteArray()
|
||||
|
||||
const DEFAULT_SYSTEM_PROMPT := "Antworte auf Deutsch. Antworte kurz und präzise in 1-2 Sätzen nur basierend auf dem bereitgestellten Dokument. Wenn die Antwort nicht im Dokument steht, antworte nur mit: 'Darauf kann ich nicht antworten, bitte stelle mir eine Frage zum EU AI Act'."
|
||||
const DEFAULT_SYSTEM_PROMPT := "CHATBOT_SYSTEM_PROMPT"
|
||||
const DEFAULT_MAX_HISTORY_TURNS := 0
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ func _ready() -> void:
|
||||
_generate_button.pressed.connect(_on_generate_pressed)
|
||||
_close_button.pressed.connect(_on_close_pressed)
|
||||
_prompt_edit.connect("input_event", _on_prompt_edit_gui_input)
|
||||
for i in range(option_button.item_count):
|
||||
option_button.set_item_text(i, tr(option_button.get_item_text(i)))
|
||||
_llama = GodotLlama.new()
|
||||
_llama.context.token_generated.connect(_on_token_generated)
|
||||
_llama.context.generation_finished.connect(_on_generation_finished)
|
||||
@@ -225,7 +227,7 @@ func _load_txt(path: String) -> String:
|
||||
|
||||
func _build_chat_prompt(user_text: String) -> String:
|
||||
var parts := PackedStringArray()
|
||||
var clean_system := DEFAULT_SYSTEM_PROMPT.strip_edges()
|
||||
var clean_system := tr(DEFAULT_SYSTEM_PROMPT).strip_edges()
|
||||
|
||||
# Llama 3 Header
|
||||
parts.append("<|begin_of_text|>")
|
||||
|
||||
Reference in New Issue
Block a user