We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53e83d8 commit 18d3877Copy full SHA for 18d3877
api/core/third_party/langchain/llms/xinference_llm.py
@@ -108,12 +108,12 @@ def _stream_generate(
108
Yields:
109
A string token.
110
"""
111
- if isinstance(model, RESTfulGenerateModelHandle):
112
- streaming_response = model.generate(
+ if isinstance(model, (RESTfulChatModelHandle, RESTfulChatglmCppChatModelHandle)):
+ streaming_response = model.chat(
113
prompt=prompt, generate_config=generate_config
114
)
115
else:
116
- streaming_response = model.chat(
+ streaming_response = model.generate(
117
118
119
0 commit comments