File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
src/vllm_tgis_adapter/tgis_utils Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 17
17
18
18
from vllm import PromptType , RequestOutput , SamplingParams
19
19
from vllm .engine .protocol import EngineClient
20
+ from vllm .sequence import RequestMetrics
20
21
21
22
logger = init_logger (__name__ )
22
23
@@ -97,7 +98,7 @@ async def generate_with_logging(*args, **kwargs) -> AsyncGenerator[RequestOutput
97
98
if last :
98
99
# Log the response
99
100
with suppress (BaseException ):
100
- _new_log_response (
101
+ _log_response (
101
102
request_id = request_id ,
102
103
correlation_id = correlation_id ,
103
104
response = last ,
@@ -108,10 +109,6 @@ async def generate_with_logging(*args, **kwargs) -> AsyncGenerator[RequestOutput
108
109
engine .generate = generate_with_logging
109
110
110
111
111
- if TYPE_CHECKING :
112
- from vllm .sequence import RequestMetrics
113
-
114
-
115
112
def _log_error (request_id : str , correlation_id : str , exception_str : str ) -> None :
116
113
logger .error (
117
114
"Request failed: request_id=%s correlation_id=%s error=%s" ,
@@ -143,7 +140,7 @@ def _log_request(
143
140
)
144
141
145
142
146
- def _new_log_response (
143
+ def _log_response (
147
144
request_id : str ,
148
145
correlation_id : str ,
149
146
response : RequestOutput ,
You can’t perform that action at this time.
0 commit comments