Skip to content

Commit de94c03

Browse files
committed
update logs to indicate prompts are not interpolated when default returned
1 parent 7db16bf commit de94c03

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkgs/sdk/server-ai/src/LdAiClient.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ public ILdAiConfigTracker ModelConfig(string key, Context context, LdAiConfig de
8686
}
8787
catch (Exception ex)
8888
{
89-
_logger.Error($"AI model config prompt has malformed message at index {i}: {ex.Message} (returning default config)");
89+
_logger.Error(
90+
$"AI model config prompt has malformed message at index {i}: {ex.Message} (returning default config, which will not contain interpolated prompt messages)");
9091
return new LdAiConfigTracker(_client, key, defaultValue, context);
9192
}
9293
}
@@ -154,7 +155,8 @@ private AiConfig ParseConfig(LdValue value, string key)
154155
}
155156
catch (JsonException e)
156157
{
157-
_logger.Error("Unable to parse AI model config for key {0}: {1}", key, e.Message);
158+
_logger.Error(
159+
$"Unable to parse AI model config for key {key}: {e.Message} (returning default config, which will not contain interpolated prompt messages)");
158160
return null;
159161
}
160162
}

0 commit comments

Comments
 (0)