Hi. I want to take only the value from this and I tried a lot of ways none of that works, my codebase are in Python. I got this from Assistant: runMessage(id=‘msg_yy42LyfCoxfHcYKYbiIDxVM8’, assistant_id=‘asst_bLjq6XuJ2sQ9VRsj68QPenph’, completed_at=None, content=[TextContentBlock(text=Text(annotations=, value=‘Hallo! Mir geht es gut, danke. Wie geht es dir?’), type=‘text’)], created_at=1714292526, file_ids=, incomplete_at=None, incomplete_details=None, metadata={}, object=‘thread.message’, role=‘assistant’, run_id=‘run_GmuGzebyp2IL1i53eXa84FRy’, status=None, thread_id=‘thread_fGwmsvGAXM2KuamaTLfomRV1’)
I need some help from you guys.
Thanks
Did you try:
messages = list(client.beta.threads.messages.list(thread_id=thread.id, run_id=run.id))
message_content = messages[0].content[0].text
print("Response: \n")
print(f"{message_content.value}\n\n")
I hope it helps!
Kristiyan
1 Like