containers / containers/ramalama
Continuation characters in chat require ' \' rather than '\'
- Dominant language
- Python
- Stars
- 3k
- Forks
- 364
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 19
Description
### Issue Description
The docs describes new line continuation characters as just `\`, however, in practice chat actually requires a space followed by `\`. This comes from [this](https://github.com/containers/ramalama/blob/104bce6841d9ee27b0b27ec8441c90d2986e71a2/ramalama/chat.py#L424) implementation in chat.py
```python
self.content.append(user_content.rstrip(" \\"))
```
### Steps to reproduce the issue
1. `run` a model
2. Begin typing a message with a continuation line.
```
e.g. "hello\
how are you?"
```
### Describe the results you received
The new line character submits the message rather than continuing.
### Describe the results you expected
A multiline message.
### ramalama info output
```yaml
{
"Accelerator": "none",
"Config": {
"api_key": "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",
"carimage": "quay.io/ramalama/ramalama",
"engine": "docker",
"settings": {
"config_files": [
"/Users/ieaves/.config/ramalama/ramalama.conf"
]
},
"user": {
"no_missing_gpu_prompt": true
}
},
...
}
```
### Upstream Latest Release
Yes
### Additional environment details
_No response_
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.