-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from Encamina/@lmarcos/translate_prompt_function
Added translate prompt function
- Loading branch information
Showing
8 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/Encamina.Enmarcha.SemanticKernel.Plugins.Text/Plugins/TextPlugin/Translate/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"schema": 1, | ||
"description": "Translate a given input text", | ||
"execution_settings": { | ||
"default": { | ||
"max_tokens": 2000, | ||
"temperature": 0.1, | ||
"top_p": 1.0, | ||
"presence_penalty": 0.0, | ||
"frequency_penalty": 0.0 | ||
} | ||
}, | ||
"input_variables": [ | ||
{ | ||
"name": "input", | ||
"description": "The input text to translate", | ||
"is_required": true | ||
}, | ||
{ | ||
"name": "locale", | ||
"description": "Language in which the translation will be generated", | ||
"is_required": true | ||
} | ||
] | ||
} |
11 changes: 11 additions & 0 deletions
11
src/Encamina.Enmarcha.SemanticKernel.Plugins.Text/Plugins/TextPlugin/Translate/skprompt.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Your task is TO TRANSLATE the INPUT text into the '{{$locale}}' language. | ||
If the INPUT text is already in the '{{$locale}}' language, you must return the INPUT text without altering it. | ||
MAKE SURE YOU ONLY USE '{{$locale}}' language. | ||
|
||
|
||
[INPUT] | ||
|
||
{{$input}} | ||
|
||
[TRANSLATION] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters