Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Apps.OpenAI/Actions/EditActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,13 @@ async Task<IEnumerable<TranslationEntity>> BatchTranslate(IEnumerable<(Unit Unit
catch (Exception ex) when (neverFail)
{
errors.Add($"Error in batch {batchCounter} (size: {batchSize}): {ex.Message}");
}
}

return allResults;
return idSegments.Select(idPair =>
{
var updatedTranslation = allResults.FirstOrDefault(x => x.TranslationId == idPair.Key);
return updatedTranslation ?? new TranslationEntity { TranslationId = idPair.Key, TranslatedText = idPair.Value.GetTarget() };
});
}

var units = content.GetUnits();
Expand Down
2 changes: 1 addition & 1 deletion Apps.OpenAI/Apps.OpenAI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Product>OpenAI</Product>
<Description>Creating safe artificial general intelligence that benefits all of humanity</Description>
<Version>2.8.19</Version>
<Version>2.8.20</Version>
<AssemblyName>Apps.OpenAI</AssemblyName>
</PropertyGroup>

Expand Down