Toggle navigation
Toggle navigation
This project
Loading...
Sign in
万朱浩
/
Venue-Ops
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Doiiars
2025-11-09 17:06:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
BaiFu
2025-11-09 19:20:27 +0800
Commit
dfc581ff6c9f7ce9f7edd77a0d28190bea0df546
dfc581ff
1 parent
58b819d8
修复流式传输重试问题
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
InsightEngine/llms/base.py
MediaEngine/llms/base.py
QueryEngine/llms/base.py
ReportEngine/llms/base.py
InsightEngine/llms/base.py
View file @
dfc581f
...
...
@@ -83,7 +83,6 @@ class LLMClient:
return
self
.
validate_response
(
response
.
choices
[
0
]
.
message
.
content
)
return
""
@with_retry
(
LLM_RETRY_CONFIG
)
def
stream_invoke
(
self
,
system_prompt
:
str
,
user_prompt
:
str
,
**
kwargs
)
->
Generator
[
str
,
None
,
None
]:
"""
流式调用LLM,逐步返回响应内容
...
...
@@ -131,6 +130,7 @@ class LLMClient:
logger
.
error
(
f
"流式请求失败: {str(e)}"
)
raise
e
@with_retry
(
LLM_RETRY_CONFIG
)
def
stream_invoke_to_string
(
self
,
system_prompt
:
str
,
user_prompt
:
str
,
**
kwargs
)
->
str
:
"""
流式调用LLM并安全地拼接为完整字符串(避免UTF-8多字节字符截断)
...
...
MediaEngine/llms/base.py
View file @
dfc581f
...
...
@@ -86,7 +86,6 @@ class LLMClient:
return
self
.
validate_response
(
response
.
choices
[
0
]
.
message
.
content
)
return
""
@with_retry
(
LLM_RETRY_CONFIG
)
def
stream_invoke
(
self
,
system_prompt
:
str
,
user_prompt
:
str
,
**
kwargs
)
->
Generator
[
str
,
None
,
None
]:
"""
流式调用LLM,逐步返回响应内容
...
...
@@ -134,6 +133,7 @@ class LLMClient:
logger
.
error
(
f
"流式请求失败: {str(e)}"
)
raise
e
@with_retry
(
LLM_RETRY_CONFIG
)
def
stream_invoke_to_string
(
self
,
system_prompt
:
str
,
user_prompt
:
str
,
**
kwargs
)
->
str
:
"""
流式调用LLM并安全地拼接为完整字符串(避免UTF-8多字节字符截断)
...
...
QueryEngine/llms/base.py
View file @
dfc581f
...
...
@@ -83,7 +83,6 @@ class LLMClient:
return
self
.
validate_response
(
response
.
choices
[
0
]
.
message
.
content
)
return
""
@with_retry
(
LLM_RETRY_CONFIG
)
def
stream_invoke
(
self
,
system_prompt
:
str
,
user_prompt
:
str
,
**
kwargs
)
->
Generator
[
str
,
None
,
None
]:
"""
流式调用LLM,逐步返回响应内容
...
...
@@ -131,6 +130,7 @@ class LLMClient:
logger
.
error
(
f
"流式请求失败: {str(e)}"
)
raise
e
@with_retry
(
LLM_RETRY_CONFIG
)
def
stream_invoke_to_string
(
self
,
system_prompt
:
str
,
user_prompt
:
str
,
**
kwargs
)
->
str
:
"""
流式调用LLM并安全地拼接为完整字符串(避免UTF-8多字节字符截断)
...
...
ReportEngine/llms/base.py
View file @
dfc581f
...
...
@@ -76,7 +76,6 @@ class LLMClient:
return
self
.
validate_response
(
response
.
choices
[
0
]
.
message
.
content
)
return
""
@with_retry
(
LLM_RETRY_CONFIG
)
def
stream_invoke
(
self
,
system_prompt
:
str
,
user_prompt
:
str
,
**
kwargs
)
->
Generator
[
str
,
None
,
None
]:
"""
流式调用LLM,逐步返回响应内容
...
...
@@ -118,6 +117,7 @@ class LLMClient:
logger
.
error
(
f
"流式请求失败: {str(e)}"
)
raise
e
@with_retry
(
LLM_RETRY_CONFIG
)
def
stream_invoke_to_string
(
self
,
system_prompt
:
str
,
user_prompt
:
str
,
**
kwargs
)
->
str
:
"""
流式调用LLM并安全地拼接为完整字符串(避免UTF-8多字节字符截断)
...
...
Please
register
or
login
to post a comment