Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ce-nistal committed Aug 30, 2024
1 parent d9f1b13 commit a4c4f37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Apps.AzueOpenAI/Actions/XliffActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ private string GetSystemPrompt(bool translator)
var index = translatedText.LastIndexOf("\",") == -1 ? translatedText.LastIndexOf("\"\n,") : translatedText.LastIndexOf("\",");
index = index == -1 ? translatedText.LastIndexOf("\n\",") == -1? translatedText.LastIndexOf("\\n\",") : translatedText.LastIndexOf("\n\",") : index;
filteredText = translatedText.Remove(index) + "\"]";
filteredText = filteredText.Replace("\\n", "").Replace("\n","");
filteredText = filteredText.Replace("\\n", "");
}
filteredText = Regex.Match(filteredText, "\\[[\\s\\S]+\\]").Value;
var result = JsonConvert.DeserializeObject<string[]>(filteredText);
Expand Down

0 comments on commit a4c4f37

Please sign in to comment.