mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-20 00:54:43 +00:00
ci(SDK): Add 0.7.0 workflow (#2493)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
from ._version import version as __version__ # noqa: F401
|
||||
|
||||
__ALL__ = ["__version__"]
|
||||
|
1
packages/dbgpt-serve/src/dbgpt_serve/_version.py
Normal file
1
packages/dbgpt-serve/src/dbgpt_serve/_version.py
Normal file
@@ -0,0 +1 @@
|
||||
version = "0.7.0"
|
@@ -345,7 +345,15 @@ class Service(BaseService[ServeEntity, ServeRequest, ServerResponse]):
|
||||
model_request = ModelRequest(**payload)
|
||||
|
||||
async for output in llm_client.generate_stream(model_request.copy()): # type: ignore
|
||||
yield f"data:{output.text}\n\n"
|
||||
text = ""
|
||||
if output.has_thinking:
|
||||
text = output.thinking_text
|
||||
lines = text.split("\n")
|
||||
text = ">" + "\n>".join(lines)
|
||||
if output.has_text:
|
||||
text += output.text
|
||||
text = text.replace("\n", "\\n")
|
||||
yield f"data:{text}\n\n"
|
||||
yield "data:[DONE]\n\n"
|
||||
except Exception as e:
|
||||
logger.error(f"Call LLMClient error, {str(e)}, detail: {payload}")
|
||||
|
Reference in New Issue
Block a user