MagnivOrg / prompt-layer-library

🍰 PromptLayer - Maintain a log of your prompts and OpenAI API requests. Track, debug, and replay old completions.
https://www.promptlayer.com
Apache License 2.0
477 stars 42 forks source link

Issue with brackets parsing in system prompt #73

Closed BedirT closed 9 months ago

BedirT commented 9 months ago

When I try to use brackets in the system prompt it removes my prompt after saving. There is no error log whatsoever, but I am assuming it is some parsing error. This shouldn't be happening as I want to use some JSON description. Even if the brackets are on different lines this happens. I tried escaping but that didn't work either.

abubakarsohail commented 9 months ago

Hi @BedirT can you provide a sample of the data you are trying to send?

BedirT commented 9 months ago

Yeah you can just try

{
}
BedirT commented 9 months ago

Or any other json integrated prompt will do the same

Jped commented 9 months ago

@BedirT is this happening via the library or the dashboard?

BedirT commented 9 months ago

This is on the dashboard.

Jped commented 9 months ago

@BedirT we are working on a solution. Can you explain one more time why you want to have empty brackets in the system prompt?

BedirT commented 9 months ago

I dont really want empty brackets but that was an example. I have a json output description such as:

"I want you to output in the following format

{ "key": "value", ... } "

Jped commented 9 months ago

@BedirT thanks for this, we will try to have something by tomorrow, it is related to our reliance on langchain

Jped commented 9 months ago

Hey @BedirT can you try again? It should be fixed.

BedirT commented 9 months ago

Works perfectly now, thanks!