llama-stack icon indicating copy to clipboard operation
llama-stack copied to clipboard

AttributeError: 'ChatCompletionResponse' object has no attribute 'event'

Open AI-Aether opened this issue 4 months ago • 2 comments

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)

AI-Aether avatar Oct 14 '24 09:10 AI-Aether