Handle Managed Motorhead Data Key (#6169)

# Handle Managed Motorhead Data Key
Managed motorhead will return a payload with a `data` key. we need to
handle this to properly access messages from the server.
searx_updates
James O'Dwyer 11 months ago committed by GitHub
parent 364f8e7b5d
commit 0475d015fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -48,6 +48,8 @@ class MotorheadMemory(BaseChatMemory):
headers=self.__get_headers(),
)
res_data = res.json()
res_data = res_data.get("data", res_data) # Handle Managed Version
messages = res_data.get("messages", [])
context = res_data.get("context", "NONE")

Loading…
Cancel
Save