You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While OpenWebUI claims to support full Markdown and LaTeX, collapsible elements like <details> and <summary> do not render properly. This limitation restricts our ability to present additional information in a clean and organized manner. Here is a code example showcasing the intended functionality(main part in the method pipe):
Here is an example of pipeline that I execute
importosfromtypingimportList, UnionfrompydanticimportBaseModelclassPipeline:
def__init__(self):
self.name="litellm testing rendering"self.valves=self.Valves(OPENAI_API_KEY=os.getenv("OPENAI_API_KEY", "keys"))
classValves(BaseModel):
""" Configuration settings for the pipeline, including API keys. """OPENAI_API_KEY: strasyncdefon_startup(self):
""" Actions to perform when the server starts. """print(f"Pipeline starting: {self.name}")
asyncdefon_shutdown(self):
""" Actions to perform when the server stops. """print(f"Pipeline stopping: {self.name}")
defpipe(self, user_message: str, model_id: str, messages: List[dict], body: dict) ->Union[str, None]:
""" Process user messages and return a formatted response with collapsible details. """print(f"Processing request with model: {model_id}")
print("Messages:", messages)
api_key=self.valves.OPENAI_API_KEYmodel_name="gpt-3.5-turbo"# Simulate getting resultsresults_data="total_rows: {4200}"results_code="SELECT COUNT(*) AS total_rows FROM my_table;"# Constructing the Markdown with collapsible detailsdetails_markdown=f""" <details> <summary>Click to expand for SQL Details</summary> **SQL Code**: `{results_code}`\n\n **Results**: `{results_data}`\n\n </details> """# Combine the response text with the collapsible detailsanswer_text_with_details=f"There are 4200 rows in the table.\n\n{details_markdown}"returnanswer_text_with_details
When lauch pipelines, I got the output below that I got unexpected format
Would it be possible to enable support for collapsible details within Markdown? This feature would greatly enhance the user experience in chat conversions.
The text was updated successfully, but these errors were encountered:
On a somewhat similar line, but a tad more technical, I asked for persistence of emitters. Basically the UI change would be that the latest received status emitter would have an arrow that when clicked would display the list of emitters received.
But to stay on topic: I too think it would be good to support collapsible details. I could use this to automatically hide the "thinking" xml tags of my claude sonnet output for example.
While OpenWebUI claims to support full Markdown and LaTeX, collapsible elements like
<details>
and<summary>
do not render properly. This limitation restricts our ability to present additional information in a clean and organized manner. Here is a code example showcasing the intended functionality(main part in the method pipe):Here is an example of pipeline that I execute
When lauch pipelines, I got the output below that I got unexpected format
Would it be possible to enable support for collapsible details within Markdown? This feature would greatly enhance the user experience in chat conversions.
The text was updated successfully, but these errors were encountered: