Conversation history
# support
k
Dear Vapi Support Team, I hope this message finds you well. We have recently integrated a Custom LLM into our application using the gpt-3.5-turbo-instruct model, and we are now planning to enhance the functionality by incorporating conversation history. Our goal is to build a conversational agent that retains context from previous interactions, allowing for a more seamless and personalized user experience. While the integration with the Custom LLM has been successful, we require the ability to pass some custom data or unique identifiers during conversations. This would enable us to store and retrieve the conversation history from our system, ensuring that the context is maintained throughout the interaction. Could you please guide us on how we can implement this feature within the current Vapi framework? We would appreciate any details on how we can pass and store custom identifiers to track conversation history effectively. Looking forward to your guidance. Best regards,
v
@KiKiN Hello, I'm delighted to hear that you've successfully integrated the gpt-3.5-turbo-instruct model into your application and are looking to enhance it with conversation history capabilities. To implement conversation history within the Vapi framework, you can follow these steps: 1. **Assign Unique Identifiers**: Assign a unique identifier to each user or conversation session. This ID will be used to track and store the conversation history. 2. **Store Conversations**: After each interaction, store the conversation data along with the unique identifier in your system. This can be done in a database or any persistent storage system you prefer. 3. **Retrieve History**: When a new conversation starts, retrieve the previous conversation history using the unique identifier before making a call to the LLM. 4. **Pass Context**: Include the retrieved conversation history as context when making requests to the LLM. This will allow the model to maintain the context of the conversation. 5. **Update Context**: After each response from the LLM, update the stored conversation history with the new interaction to keep the context current. If you need to pass custom data or unique identifiers during conversations, you can typically do so by including them in the payload of your API requests to the LLM. Ensure that your system is designed to handle these identifiers securely and efficiently. For more specific guidance or if you encounter any issues, please provide additional details about your current setup, and we'll be happy to assist you further. Best regards, Vapi Support Team
You can continue this conversation by mentioning me in the message.
s
@KiKiN you can use customer object or customer phone number.
2 Views