-
Notifications
You must be signed in to change notification settings - Fork 14
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
JSON error when passing image_url #521
Comments
Hi there, can you share a repro (ideally the prompt, or a similar prompt that still reproduces the issue)? |
Here's the simplest version that's failing: query_variables = {'context': '\n ###### USER CONTEXT ######', 'query': 'is avocado ok?', 'image_url': ''} I basically call this with: |
We need a prompt definition that reproduces it to be able to assist you further. |
Does it work if I send a prompt_id and revision? |
Only if you add one of us, e.g. [email protected], as a user to your account with "Engineer" privileges. |
@ankrgyl any updates? |
Hi @luiz-alma we confirmed the repro and will take a look at it sometime this week. |
hi @luiz-alma. thank you for reporting and being patient with us! I've got a possible fix here. will follow-up when we get this ready for you to try |
awesome! thanks for the update |
When I'm passing a formatted context to
braintrust.build
like so:prompt.build(context=context, query=query, image_url=image_url)
, I'm gettingjson.decoder.JSONDecodeError: Invalid control character at: line 1 column 23 (char 22)
. That happens whenevercontext
has some line breaks.I tried removing the
image_url
and it works. Also tried removing thecontext
and leavingimage_url
, which also works. Seems like there's some issue with parsing the prompt variables.The text was updated successfully, but these errors were encountered: