You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 87ed2b1
Browse filesBrowse the repository at this point in the historyBrowse files
- Fix bug where after LSP restart the playground wouldnt load unless you
typed something into the editor
- Fix telemetry not working on Cursor
<!-- ELLIPSIS_HIDDEN -->
> [!IMPORTANT]
> Add support for handling audio input URLs in OpenAI client and improve
telemetry and logging.
>
> - **Behavior**:
> - Add `resolve_audio_urls` and `resolve_image_urls` to `ModelFeatures`
in `mod.rs`.
> - Update `OpenAIClient`, `AnthropicClient`, `AwsClient`,
`GoogleAIClient`, and `VertexClient` to handle audio and image URLs
separately.
> - Modify `process_media_urls()` in `traits/mod.rs` to use separate
resolution modes for audio and image.
> - **Telemetry**:
> - Add telemetry logging for test runs in `test-runner.ts`.
> - Update telemetry settings handling in `telemetryReporter.ts`.
> - **Misc**:
> - Add version logging in `server.rs`.
> - Remove `restartClient()` function from `util.ts` and update client
restart logic in `index.ts`.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup>
for 2f85961. You can
[customize](https://app.ellipsis.dev/BoundaryML/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->
anyhow::bail!("BAML internal error (openai): image file should have been resolved, not processed directly.");
363
+
}
364
+
}
364
365
}
365
-
BamlMediaContent::File(_) => {
366
-
anyhow::bail!(
367
-
"BAML internal error (openai): file should have been resolved to base64"
368
-
)
366
+
BamlMediaType::Audio => {
367
+
let type_value = "input_audio";
368
+
let payload_key = "input_audio";
369
+
content.insert("type".into(),json!(type_value));
370
+
371
+
match&media.content{
372
+
BamlMediaContent::Base64(b64_media) => {
373
+
let mime_type_str = media.mime_type_as_ok()?;
374
+
let format_str = match mime_type_str.as_str(){
375
+
"audio/wav" | "wav" => "wav",
376
+
"audio/mp3" | "mp3" => "mp3",
377
+
// Add other supported formats here if needed in the future
378
+
_ => anyhow::bail!(
379
+
"Unsupported audio format for input_audio: '{}'. OpenAI currently supports 'wav' and 'mp3' for this structure.",
380
+
mime_type_str
381
+
),
382
+
};
383
+
384
+
content.insert(
385
+
payload_key.into(),
386
+
json!({
387
+
"data": b64_media.base64,
388
+
"format": format_str
389
+
}),
390
+
);
391
+
}
392
+
BamlMediaContent::Url(_) => {
393
+
anyhow::bail!(
394
+
"BAML internal error (openai): Audio content is a URL. Expected Base64 for '{}' type due to client's ResolveMediaUrls::Always setting. The URL should have been resolved to base64 before this stage.",
395
+
type_value
396
+
);
397
+
}
398
+
BamlMediaContent::File(_) => {
399
+
anyhow::bail!(
400
+
"BAML internal error (openai): audio file should have been resolved to base64, not processed directly."
0 commit comments