Skip to content

Commit

Permalink
update logs to indicate prompts are not interpolated when default ret…
Browse files Browse the repository at this point in the history
…urned
  • Loading branch information
cwaldren-ld committed Nov 15, 2024
1 parent 7db16bf commit de94c03
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/sdk/server-ai/src/LdAiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ public ILdAiConfigTracker ModelConfig(string key, Context context, LdAiConfig de
}
catch (Exception ex)
{
_logger.Error($"AI model config prompt has malformed message at index {i}: {ex.Message} (returning default config)");
_logger.Error(
$"AI model config prompt has malformed message at index {i}: {ex.Message} (returning default config, which will not contain interpolated prompt messages)");
return new LdAiConfigTracker(_client, key, defaultValue, context);
}
}
Expand Down Expand Up @@ -154,7 +155,8 @@ private AiConfig ParseConfig(LdValue value, string key)
}
catch (JsonException e)
{
_logger.Error("Unable to parse AI model config for key {0}: {1}", key, e.Message);
_logger.Error(
$"Unable to parse AI model config for key {key}: {e.Message} (returning default config, which will not contain interpolated prompt messages)");
return null;
}
}
Expand Down

0 comments on commit de94c03

Please sign in to comment.