Skip to content

662-srv278-web163

@ekassos ekassos tagged this 30 Apr 01:13
Closes #848. Adds support for the following syntax in prompts:

```
<random count="2" allow-repeat="false">
  <option weight="2">Apple</option>
  <option weight="1">Banana</option>
  <option>Cherry</option>
</random>
```

If `allow-repeat` is false and `count` is smaller than the total number
of options, all options will be returned. All three parameters are
optional and have the following default values:
- count: 1
- allow-repeat: false
- weight: 1

Randomization is deterministic but follows the following approaches:
- Selection with Replacement: inverse transform sampling
- Selection without Replacement: priority sampling

Users who have editing permissions for each assistant can see the
generated prompt in thread settings (where Publish and Delete options
are placed).
Assets 2
Loading