Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
bd3a9b2f
Unverified
Commit
bd3a9b2f
authored
Aug 24, 2023
by
takatost
Committed by
GitHub
Aug 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: xinference-chat-stream-response (#991)
parent
18d38771
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
xinference_llm.py
api/core/third_party/langchain/llms/xinference_llm.py
+6
-1
No files found.
api/core/third_party/langchain/llms/xinference_llm.py
View file @
bd3a9b2f
...
...
@@ -123,7 +123,12 @@ class XinferenceLLM(Xinference):
if
choices
:
choice
=
choices
[
0
]
if
isinstance
(
choice
,
dict
):
if
'text'
in
choice
:
token
=
choice
.
get
(
"text"
,
""
)
elif
'delta'
in
choice
and
'content'
in
choice
[
'delta'
]:
token
=
choice
.
get
(
'delta'
)
.
get
(
'content'
)
else
:
continue
log_probs
=
choice
.
get
(
"logprobs"
)
if
run_manager
:
run_manager
.
on_llm_new_token
(
...
...
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