Allow user to define whitespace pattern for outlines (#4305)
This commit is contained in:
@@ -146,6 +146,11 @@ class ChatCompletionRequest(OpenAIBaseModel):
|
||||
"If specified, will override the default guided decoding backend "
|
||||
"of the server for this specific request. If set, must be either "
|
||||
"'outlines' / 'lm-format-enforcer'"))
|
||||
guided_whitespace_pattern: Optional[str] = Field(
|
||||
default=None,
|
||||
description=(
|
||||
"If specified, will override the default whitespace pattern "
|
||||
"for guided json decoding."))
|
||||
|
||||
# doc: end-chat-completion-extra-params
|
||||
|
||||
@@ -285,6 +290,11 @@ class CompletionRequest(OpenAIBaseModel):
|
||||
"If specified, will override the default guided decoding backend "
|
||||
"of the server for this specific request. If set, must be one of "
|
||||
"'outlines' / 'lm-format-enforcer'"))
|
||||
guided_whitespace_pattern: Optional[str] = Field(
|
||||
default=None,
|
||||
description=(
|
||||
"If specified, will override the default whitespace pattern "
|
||||
"for guided json decoding."))
|
||||
|
||||
# doc: end-completion-extra-params
|
||||
|
||||
|
||||
Reference in New Issue
Block a user