Skip to content
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

Expose Prompt and Parser separately #1505

Open
wants to merge 47 commits into
base: canary
Choose a base branch
from

Conversation

antoniosarosi
Copy link
Contributor

@antoniosarosi antoniosarosi commented Feb 22, 2025

Copy link

vercel bot commented Feb 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baml ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 7:18pm

@antoniosarosi antoniosarosi changed the title Python prompt parser Expose Prompt and Parser separately Feb 22, 2025
Copy link
Contributor

@aaronvg aaronvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work with the giant PR

Can you also run the with_options test for all 3 langs, and collector tests in ruby, and ts? They should all pass.

Some nits on naming -- e.g. build_request in the internal pyo3 interface / other ones could be renamed to get_http_request_body -- as that is exactly what we return -- it's not headers or anything.

The external interface can remain b.request

In python integ tests there is a script that runs some tests on CI. You'll want to ignore your new test file there. This is why CI fails

}

withOptions(baml_options: BamlCallOptions) {
return new BamlSyncClient(this.runtime, this.ctx_manager, baml_options)
withOptions(bamlOptions: BamlCallOptions) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch with the name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaronvg build_request returns the entire HTTP request type (including headers, URL, method) not just the body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants