Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ktransformers
Commits
62c40231
Commit
62c40231
authored
Apr 17, 2025
by
Creeper-MZ
Browse files
Fixed #1155
parent
4fb19bfc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ktransformers/server/schemas/endpoints/chat.py
ktransformers/server/schemas/endpoints/chat.py
+2
-2
No files found.
ktransformers/server/schemas/endpoints/chat.py
View file @
62c40231
...
...
@@ -24,7 +24,7 @@ class Message(BaseModel):
content
:
Optional
[
str
]
=
None
role
:
Role
name
:
Optional
[
str
]
=
None
tool_calls
:
Optional
[
List
[
Dict
[
str
,
Any
]]]
=
None
tool_calls
:
Optional
[
List
[
Dict
[
str
,
Any
]]]
=
{}
tool_call_id
:
Optional
[
str
]
=
None
def
to_tokenizer_message
(
self
):
...
...
@@ -33,7 +33,7 @@ class Message(BaseModel):
message
[
'content'
]
=
self
.
content
if
self
.
name
is
not
None
:
message
[
'name'
]
=
self
.
name
if
self
.
tool_calls
is
not
None
:
if
self
.
tool_calls
is
not
{}
:
message
[
'tool_calls'
]
=
self
.
tool_calls
if
self
.
tool_call_id
is
not
None
:
message
[
'tool_call_id'
]
=
self
.
tool_call_id
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment