how do I load prior conversations to give context ...
# support
r
I'm saving the call history to a database and when an incoming call is answered I need the last call to be available for the assistant to reference. I'm using a function to retrieve the call data, and it's successfully executed but the assistant doesn't seem to have any knowledge of the call still. Anyone got an idea?
v
@RC It sounds like you've done a great job setting up the function to retrieve the call data. To ensure that the assistant can reference the last call, you might need to pass the retrieved call data to the assistant as context for the current session. If the assistant is not retaining the information, it could be due to the way the data is being handled after retrieval. Here are a few steps you can take to troubleshoot and resolve the issue: 1. **Check Data Retrieval**: Ensure that the function to retrieve the call data is returning the correct information. 2. **Context Passing**: Verify that the retrieved call data is being passed as context to the assistant in the correct format. 3. **Session Management**: Make sure that the session management logic is correctly maintaining the context between calls. 4. **HIPAA Compliance**: If
hipaaEnabled
is set to true, remember that the call data won't be stored, so you'll need to handle this within your own infrastructure while complying with HIPAA regulations. 5. **Data Persistence**: If you're using a database, ensure that the data persistence logic is correctly storing and retrieving the call records. 6. **Assistant Configuration**: Check the assistant's configuration to ensure it's set up to use the context provided. If you've checked all these and the issue persists, you might need to provide more details on how the assistant is configured to use the call data, or there might be a need to adjust the assistant's logic to make use of the context provided. If you need further assistance with this, please provide additional details or ask support for more info on this.
You can continue this conversation by mentioning me in the message.
r
@Shubham Bajaj can you help on this?
s
@RC you can append the previous call history and assign the role system, and then can reference it during the call.
ref
Copy code
"messages": [
      {
        "content": "<insert-system-prompt-here>",
        "role": "system"
      },
      {
        "content": "<insert-call-history-here>",
        "role": "system"
      }
    ]

`
r
@Shubham Bajaj Thanks I'll try it. 😉
8 Views