-
Notifications
You must be signed in to change notification settings - Fork 178
Closed
Description
Description
Call for create_message_and_wait
Reproduction
if not databricks_client:
return {"error": "Databricks client not initialized. Check authentication."}
try:
# Call the Genie API to create a message
genie_api = databricks_client.genie
message = genie_api.create_message_and_wait(space_id, conversation_id, content)
# Format the response for better readability, modeling it after the REST API response
return {
"message_id": message.message_id, # although this is the correct field, it is not present in the response
# "message_id": message.id,
"content": message.content,
"status": message.status.value if message.status else None,
# Include any attachments if present
"attachments": getattr(message, 'attachments', None),
"conversation_id": message.conversation_id
}
except Exception as e:
# Handle specific exceptions for better error messages
print(f"Error creating message: {str(e)}")
return {"error": f"Error creating message: {str(e)}"}
Expected behavior
message created and added to conversation
Is it a regression?
don't know
Debug Logs
The SDK logs helpful debugging information when debug logging is enabled. Set the log level to debug by adding logging.basicConfig(level=logging.DEBUG) to your program, and include the logs here.
Other Information
- OS: [e.g. macOS]
- Version: [e.g. 0.1.0]
Additional context
In code of dashboards.py there is a usage of "id" instead of "message_id"
Andrei-ZHOU and ankit424
Metadata
Metadata
Assignees
Labels
No labels