mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-24 09:51:19 +08:00
Add more docs for regex (#30106)
Signed-off-by: Xu Song <xusong.vip@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
8580919ac3
commit
25221b44bb
@ -61,7 +61,7 @@ Now let´s see an example for each of the cases, starting with the `choice`, as
|
|||||||
print(completion.choices[0].message.content)
|
print(completion.choices[0].message.content)
|
||||||
```
|
```
|
||||||
|
|
||||||
The next example shows how to use the `regex`. The idea is to generate an email address, given a simple regex template:
|
The next example shows how to use the `regex`. The supported regex syntax depends on the structured output backend. For example, `xgrammar`, `guidance`, and `outlines` use Rust-style regex, while `lm-format-enforcer` uses Python's `re` module. The idea is to generate an email address, given a simple regex template:
|
||||||
|
|
||||||
??? code
|
??? code
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user