Initial set up
Import required modules for Threads, Messages, Feedback, and Users. More details about these concepts and data types can be found on the overview page. Find our SDKs on GitHub: Python | TypeScriptSet up the Melodi client
Your API key can be found in Settings. For more information, see API Access.Create a project
Projects can also be created via the UI.Create a thread in Melodi
Threads are a flexible data format that support customizable message types, including user, AI response, RAG lookup, and other. You can optionally specify when a thread was created using thecreatedAt
field.
Add feedback to the thread
Add basic positive/negative feedback
Feedback can be added to a thread to provide additional context about the conversation.Add feedback with attributes
Attributes are additional metadata that can be added to feedback that becomes filterable in the UI. Feedback attributes can be created from the Settings page.These attributes and options need to already exist in your organization or this call will fail
Create or update a user
You can create or update users in Melodi to associate with threads.Backdate threads
When importing historical conversations or maintaining accurate timestamps, you can specify when a thread was created using thecreatedAt
field.
This is particularly useful when:
- Importing historical conversations from another system
- Maintaining accurate timestamps for analytics
- Recording conversations that happened in the past