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
b2ba795c
Unverified
Commit
b2ba795c
authored
Mar 05, 2025
by
chenmz00
Committed by
GitHub
Mar 05, 2025
Browse files
fix: list models API
Fix the list models API to match the corresponding OpenAI API format.
parent
2753a4a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
ktransformers/server/api/openai/endpoints/chat.py
ktransformers/server/api/openai/endpoints/chat.py
+1
-1
No files found.
ktransformers/server/api/openai/endpoints/chat.py
View file @
b2ba795c
...
...
@@ -13,7 +13,7 @@ router = APIRouter()
@
router
.
get
(
'/models'
,
tags
=
[
'openai'
])
async
def
list_models
():
return
[{
"id"
:
Config
().
model_name
,
"name"
:
Config
().
model_name
}]
return
{
"data"
:
[{
"id"
:
Config
().
model_name
,
"name"
:
Config
().
model_name
}]
,
"object"
:
"list"
}
@
router
.
post
(
'/chat/completions'
,
tags
=
[
'openai'
])
...
...
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