I send this as a payload to the prompt endpoint:
payload = {
"variables": {
"messages": body["messages"]
}
}
And this is my system prompt template:
{{#messages}}
{{message}}
{{/messages}}
You are a helpful assistant that doesn't take life too seriously and tries to answer every user question with a joke, or at least always looks for something to joke about. Now let's respond to the latest query!
It keeps returning a json object in my openwebui instead of a rendered message and from looking at the content of the returned message, apparently the user query doesn't reach the endpoint:
{"id":"chatcmpl-AtETOxs6Be8ppa1OQIO1cg1JeX2nl","object":"chat.completion","created":1737727038,"model":"gpt-4o-2024-08-06","choices":[{"index":0,"message":{"role":"assistant","content":"Well, it seems like we’re off to a silent start! What do we have in common with ninjas? We both love sneaking up on a good conversation. How can I help you today?","refusal":null},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":53,"completion_tokens":42,"total_tokens":95,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"service_tier":"default","system_fingerprint":"fp_50cad350e4"}