Skip to content

Commit b46b23a

Browse files
authored
[cherry-pick] add ignore_eos support in chat completions schema (#2281) (#2283)
1 parent edbbfd4 commit b46b23a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

engines/python/setup/djl_python/chat_completions/chat_properties.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ class ChatProperties(BaseModel):
114114
temperature: Optional[float] = 1.0
115115
top_p: Optional[float] = 1.0
116116
user: Optional[str] = Field(default=None, exclude=True)
117+
ignore_eos: bool = False
117118

118119
@field_validator('frequency_penalty', mode='before')
119120
def validate_frequency_penalty(

serving/docs/lmi/user_guides/chat_input_output_schema.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Request Body Fields:
3434
| `temperature` | float | no | Float number between 0.0 and 2.0. |
3535
| `top_p` | float | no | Float number. |
3636
| `user` | string | no | example: "test" |
37+
| `ignore_eos` | boolean | no | `true`, `false` (default) |
3738

3839
Example request using curl
3940

0 commit comments

Comments
 (0)