fix(empty value in secret expansion):

This commit is contained in:
Alexander Myasoedov
2025-02-20 23:31:06 +02:00
parent c97e43612b
commit 60e6dd0a1a
+3 -2
View File
@@ -27,8 +27,7 @@ def encode_audio_base64_by_url(url: str) -> str:
return "data:audio/mpeg;base64," + encoded_content
class InvalidHTTPSpecError(Exception):
...
class InvalidHTTPSpecError(Exception): ...
class LLMSpec(BaseModel):
@@ -169,6 +168,8 @@ def parse_http_spec(http_spec: str) -> LLMSpec:
has_audio = "<<BASE64_AUDIO>>" in body
for key, value in secrets.items():
if not value:
continue
key = key.strip("$")
body = body.replace(f"${key}", value)