This commit is contained in:
Xi Yan 2025-02-10 21:55:36 -08:00
parent ba0b620532
commit 71c9063657
2 changed files with 1 additions and 5 deletions

View file

@ -123,7 +123,7 @@ class DatabricksInferenceAdapter(ModelRegistryHelper, Inference):
yield chunk
stream = _to_async_generator()
async for chunk in process_chat_completion_stream_response(stream, self.formatter):
async for chunk in process_chat_completion_stream_response(stream, self.formatter, request):
yield chunk
def _get_params(self, request: ChatCompletionRequest) -> dict:

View file

@ -265,12 +265,8 @@ async def process_chat_completion_stream_response(
buffer = ""
ipython = False
stop_reason = None
from rich.pretty import pprint
async for chunk in stream:
print("!! CHUNK !!")
pprint(chunk)
choice = chunk.choices[0]
finish_reason = choice.finish_reason