Fixed missing proper exception in AIProvider

This commit is contained in:
2025-12-13 17:05:56 +01:00
parent a1ed65ee41
commit 09d709966b
2 changed files with 4 additions and 2 deletions

View File

@@ -106,7 +106,7 @@ public class AIProvider
if (responseContentTokens is null)
{
_logger.LogError("Unable to select tokens using JSONPath {embeddingsJsonPath} for string: {responseContent}.", [embeddingsJsonPath, responseContent]);
throw new Exception($"Unable to select tokens using JSONPath {embeddingsJsonPath} for string: {responseContent}."); // TODO add proper exception
throw new JSONPathSelectionException(embeddingsJsonPath, responseContent);
}
return [.. responseContentTokens.Values<float>()];
}