-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug fixes to cURL rendering and mime_type overriding #763
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
engine/baml-runtime/src/internal/llm_client/primitive/openai/openai_client.rs
: Added logging for base and proxy URLs; updated request URL to include query parameters.engine/baml-runtime/src/internal/llm_client/traits/mod.rs
: Enabled mime_type override; included query parameters in Azure cURL rendering; added toggle for streaming/non-streaming cURL requests.typescript/playground-common/src/baml_wasm_web/EventListener.tsx
: IntroducedstreamCurl
atom for toggling cURL request types.typescript/playground-common/src/shared/FunctionPanel.tsx
: Added switch for streaming/non-streaming cURL requests; updated button styling.engine/baml-schema-wasm/src/runtime_wasm/mod.rs
: Changed logging level from 'Warn' to 'Info' in WebAssembly initialization.
7 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
engine/baml-runtime/src/internal/llm_client/primitive/openai/openai_client.rs
: Removed logging for base and proxy URLs; added query parameters to Azure cURL rendering.engine/baml-runtime/src/internal/llm_client/traits/mod.rs
: Allowed mime_type override; included query parameters in Azure cURL; added toggle for streaming/non-streaming cURL requests.engine/baml-schema-wasm/src/runtime_wasm/mod.rs
: Updated logging level fromInfo
toWarn
during WebAssembly initialization.typescript/playground-common/src/shared/Selectors.tsx
: Minor class name and formatting adjustments.typescript/playground-common/src/shared/SettingsDialog.tsx
: Updated button class name for consistent styling.
5 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Introduced
should_proxy
parameter tobuild_request
in multiple clients for proxy URL management (/engine/baml-runtime/src/internal/llm_client/primitive/anthropic/anthropic_client.rs
,/engine/baml-runtime/src/internal/llm_client/primitive/google/google_client.rs
,/engine/baml-runtime/src/internal/llm_client/primitive/openai/openai_client.rs
). - Updated
render_raw_curl
to include query parameters in Azure requests and toggle streaming/non-streaming (/engine/baml-runtime/src/internal/llm_client/traits/mod.rs
). - Minor formatting adjustment in AWS client (
/engine/baml-runtime/src/internal/llm_client/primitive/aws/aws_client.rs
). - Deleted line affecting 'baml-render-url' header handling in VSCode extension (
/typescript/vscode-ext/packages/vscode/src/extension.ts
).
7 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Fixed typo in
destination_url
variable name (/engine/baml-runtime/src/internal/llm_client/primitive/anthropic/anthropic_client.rs
) - Ensured correct URL usage in request-building process (
/engine/baml-runtime/src/internal/llm_client/primitive/anthropic/anthropic_client.rs
)
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Renamed
should_proxy
toallow_proxy
for clarity (/engine/baml-runtime/src/internal/llm_client/primitive/anthropic/anthropic_client.rs
,/engine/baml-runtime/src/internal/llm_client/primitive/google/google_client.rs
,/engine/baml-runtime/src/internal/llm_client/primitive/openai/openai_client.rs
,/engine/baml-runtime/src/internal/llm_client/primitive/request.rs
) - Improved cURL rendering to include query parameters for Azure requests (
/engine/baml-runtime/src/internal/llm_client/primitive/google/google_client.rs
) - Allowed users to override inferred
mime_type
from URL media input (/engine/baml-runtime/src/internal/llm_client/primitive/google/google_client.rs
) - Added toggle for streaming/non-streaming cURL requests in
CurlSnippet
component (/typescript/playground-common/src/shared/FunctionPanel.tsx
) - Minor formatting fix in
globals.css
(/typescript/fiddle-frontend/app/globals.css
)
6 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Refactored media URL processing logic into
process_media_urls
function (/engine/baml-runtime/src/internal/llm_client/traits/mod.rs
) - Added support for overriding mime_type (
/engine/baml-runtime/src/internal/llm_client/traits/mod.rs
) - Enhanced cURL rendering to include query parameters and toggle between streaming/non-streaming requests (
/engine/baml-runtime/src/internal/llm_client/traits/mod.rs
) - Switched client from AwsBedrock to Gemini and updated prompt (
/integ-tests/baml_src/test-files/functions/input/named-args/single/named-image.baml
) - Updated test cases to reflect client and prompt changes (
/integ-tests/baml_src/test-files/functions/input/named-args/single/named-image.baml
)
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Improved cURL rendering and request body handling (
/engine/baml-runtime/src/internal/llm_client/traits/mod.rs
) - Ensured URL and headers are managed correctly (
/engine/baml-runtime/src/internal/llm_client/traits/mod.rs
) - Switched client from Gemini to AwsBedrock (
/integ-tests/baml_src/test-files/functions/input/named-args/single/named-image.baml
) - Updated prompt to describe an image in 4 words, including color (
/integ-tests/baml_src/test-files/functions/input/named-args/single/named-image.baml
) - Updated test cases with specific image URLs (
/integ-tests/baml_src/test-files/functions/input/named-args/single/named-image.baml
)
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes: