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
opencompass
Commits
522241a8
"docs/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "f29b93488dee9af000fab6e7bdb68ab565d50564"
Unverified
Commit
522241a8
authored
Nov 24, 2023
by
Yang Yong
Committed by
GitHub
Nov 24, 2023
Browse files
[Fix] Fix lightllmapi list bug (#635)
parent
18849126
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
opencompass/models/lightllm_api.py
opencompass/models/lightllm_api.py
+4
-1
No files found.
opencompass/models/lightllm_api.py
View file @
522241a8
...
@@ -73,7 +73,10 @@ class LightllmAPI(BaseAPIModel):
...
@@ -73,7 +73,10 @@ class LightllmAPI(BaseAPIModel):
continue
continue
try
:
try
:
response
=
raw_response
.
json
()
response
=
raw_response
.
json
()
return
response
[
'generated_text'
]
generated_text
=
response
[
'generated_text'
]
if
isinstance
(
generated_text
,
list
):
generated_text
=
generated_text
[
0
]
return
generated_text
except
requests
.
JSONDecodeError
:
except
requests
.
JSONDecodeError
:
self
.
logger
.
error
(
'JsonDecode error, got'
,
self
.
logger
.
error
(
'JsonDecode error, got'
,
str
(
raw_response
.
content
))
str
(
raw_response
.
content
))
...
...
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