5 Commits

Author SHA1 Message Date
Bruce MacDonald
e03fbf558d chat mode
- add messages as alternative to prompt/response format
- remove deprecated context and template generate parameters from docs
- context and template are still supported for the time being and will continue to work as expected
2023-11-20 12:13:48 -05:00
Bruce MacDonald
4718ecc62e switch to role based messages 2023-11-20 12:13:48 -05:00
Bruce MacDonald
9c21d23a35 add messages to /generate api
- deprecate generation context, but continue to support it
- on first request generation context will still be returned
- if messages are specified context is not returned
- rebuild generation context from prompt/reply messages
- update generate docs with messages parameter
2023-11-20 12:13:13 -05:00
Bruce MacDonald
a0c3e989de
deprecate modelfile embed command (#759) 2023-10-16 11:07:37 -04:00
Quinn Slack
62d29b2157 do not HTML-escape prompt
The `html/template` package automatically HTML-escapes interpolated strings in templates. This behavior is undesirable because it causes prompts like `<h1>hello` to be escaped to `&lt;h1&gt;hello` before being passed to the LLM.

The included test case passes, but before the code change, it failed:

```
--- FAIL: TestModelPrompt
    images_test.go:21: got "a&lt;h1&gt;b", want "a<h1>b"
```
2023-09-01 17:16:38 -05:00