mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-09 19:58:29 +00:00
clean up
This commit is contained in:
parent
ba0b620532
commit
71c9063657
2 changed files with 1 additions and 5 deletions
|
@ -123,7 +123,7 @@ class DatabricksInferenceAdapter(ModelRegistryHelper, Inference):
|
||||||
yield chunk
|
yield chunk
|
||||||
|
|
||||||
stream = _to_async_generator()
|
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
|
yield chunk
|
||||||
|
|
||||||
def _get_params(self, request: ChatCompletionRequest) -> dict:
|
def _get_params(self, request: ChatCompletionRequest) -> dict:
|
||||||
|
|
|
@ -265,12 +265,8 @@ async def process_chat_completion_stream_response(
|
||||||
buffer = ""
|
buffer = ""
|
||||||
ipython = False
|
ipython = False
|
||||||
stop_reason = None
|
stop_reason = None
|
||||||
from rich.pretty import pprint
|
|
||||||
|
|
||||||
async for chunk in stream:
|
async for chunk in stream:
|
||||||
print("!! CHUNK !!")
|
|
||||||
pprint(chunk)
|
|
||||||
|
|
||||||
choice = chunk.choices[0]
|
choice = chunk.choices[0]
|
||||||
finish_reason = choice.finish_reason
|
finish_reason = choice.finish_reason
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue