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
479 stars 42 forks source link

issue with publishing prompt template #48

Closed BanaIbrahim closed 12 months ago

BanaIbrahim commented 12 months ago

publishing a template is failing with me, I debugged the whole process of creating LangChain messages and all seems right. Here is the Error: Exception: PromptLayer had the following error while publishing your prompt: PromptLayer had the following error while publishing your prompt: [{'loc': ['prompt_template', 'template'], 'msg': 'field required', 'type': 'value_error.missing'}]

abubakarsohail commented 12 months ago

Hi @BanaIbrahim can you share your prompt template here?

nkoprowicz3 commented 12 months ago

I'm having the same issue. I'm running code that I was able to run with no problems on Monday but now I get this exception. Here's an example

template = "Some system template"
system_message_prompt = SystemMessagePromptTemplate.from_template(template)
human_template = "Some human template"
human_message_prompt = HumanMessagePromptTemplate.from_template(human_template)
chat_prompt = ChatPromptTemplate.from_messages([system_message_prompt, human_message_prompt])
promptlayer.prompts.publish('chat_prompt', prompt_template=chat_prompt, tags=['chat'])
BanaIbrahim commented 12 months ago

It's not related to the actual prompt as I have multiple prompts and all of them are failing, while this was not the case the last time I ran it.

Jped commented 12 months ago

@BanaIbrahim and @nkoprowicz3 please try again

BanaIbrahim commented 12 months ago

@BanaIbrahim and @nkoprowicz3 please try again

Yeah it's working again. Thanks!