fix: more missing syntax colouring

Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com>
This commit is contained in:
thiswillbeyourgithub 2025-05-09 13:44:39 +02:00
parent ff0419d9ab
commit 0ff06a7912
3 changed files with 8 additions and 8 deletions

View File

@ -27,7 +27,7 @@ Actions have a single main component called an action function. This component t
<details>
<summary>Example</summary>
```
```python
async def action(
self,
body: dict,

View File

@ -177,10 +177,10 @@ def stream(self, event: dict) -> dict:
```
> **Example Streamed Events:**
```json
{'id': 'chatcmpl-B4l99MMaP3QLGU5uV7BaBM0eDS0jb','choices': [{'delta': {'content': 'Hi'}}]}
{'id': 'chatcmpl-B4l99MMaP3QLGU5uV7BaBM0eDS0jb','choices': [{'delta': {'content': '!'}}]}
{'id': 'chatcmpl-B4l99MMaP3QLGU5uV7BaBM0eDS0jb','choices': [{'delta': {'content': ' 😊'}}]}
```jsonl
{"id": "chatcmpl-B4l99MMaP3QLGU5uV7BaBM0eDS0jb","choices": [{"delta": {"content": "Hi"}}]}
{"id": "chatcmpl-B4l99MMaP3QLGU5uV7BaBM0eDS0jb","choices": [{"delta": {"content": "!"}}]}
{"id": "chatcmpl-B4l99MMaP3QLGU5uV7BaBM0eDS0jb","choices": [{"delta": {"content": " 😊"}}]}
```
📖 **What Happens?**
- Each line represents a **small fragment** of the model's streamed response.
@ -289,4 +289,4 @@ By now, youve learned:
🚀 **Your Turn**: Start experimenting! What small tweak or context addition could elevate your Open WebUI experience? Filters are fun to build, flexible to use, and can take your models to the next level!
Happy coding! ✨
Happy coding! ✨

View File

@ -13,7 +13,7 @@ When adding valves to your pipeline, include a way to ensure that valves can be
- Use `os.getenv()` to set an environment variable to use for the pipeline, and a default value to use if the environment variable isn't set. An example can be seen below:
```
```python
self.valves = self.Valves(
**{
"LLAMAINDEX_OLLAMA_BASE_URL": os.getenv("LLAMAINDEX_OLLAMA_BASE_URL", "http://localhost:11434"),
@ -25,7 +25,7 @@ self.valves = self.Valves(
- Set the valve to the `Optional` type, which will allow the pipeline to load even if no value is set for the valve.
```
```python
class Pipeline:
class Valves(BaseModel):
target_user_roles: List[str] = ["user"]