llama-stack
llama-stack copied to clipboard
AttributeError: 'ChatCompletionResponse' object has no attribute 'event'
data_url = data_url_from_image("dog.jpg") print("The obtained data url is", data_url) iterator = client.inference.chat_completion( model=model, messages=[ { "role": "user", "content": [ { "image": { "uri": data_url } }, "Write a haiku describing the image" ] } ], stream=True )
for chunk in iterator: print(chunk.event.delta, end="", flush=True)