Closed bshikin closed 11 months ago
Using known_translations/{target_engine}.yaml with a collection of known correct translations.
known_translations/{target_engine}.yaml
Use chromadb as a vector DB for embeddings of known translations. Lookup closest translations and add them into the translation context on each query.
Example configuration:
known_translations: target_engine: godot embedding_function: krlvi/sentence-t5-base-nlpl-code_search_net result_count: 5 user_request: | Remember this correct translation from Unity:
${SOURCE} ``` is translated as: ``` ${TARGET} ```
assistant_response: Certainly! I will remember this translation.
Where example content of the known translations file is:
translations:
title: Start() Function source: | private void Start() { {function_body} }
target: | func _ready() -> void: { {translated_function_body} }
Using
known_translations/{target_engine}.yaml
with a collection of known correct translations.Use chromadb as a vector DB for embeddings of known translations. Lookup closest translations and add them into the translation context on each query.
Example configuration:
assistant_response: Certainly! I will remember this translation.
translations:
---------------------------------------------------------------------------------------------------------------------
title: Start() Function source: | private void Start() { {function_body} }
target: | func _ready() -> void: { {translated_function_body} }
---------------------------------------------------------------------------------------------------------------------