📢 Announcing our research paper: Zentry achieves 26% higher accuracy than OpenAI Memory, 91% lower latency, and 90% token savings! Read the paper to learn how we're revolutionizing AI agent memory.
Overview
The Personalized AI Travel Assistant uses Zentry to store and retrieve information across interactions, enabling a tailored travel planning experience. It integrates with OpenAI’s GPT-4 model to provide detailed and context-aware responses to user queries.Setup
Install the required dependencies using pip:Full Code Example
Here’s the complete code to create and interact with a Personalized AI Travel Assistant using Zentry:Key Components
- Initialization: The
PersonalTravelAssistantclass is initialized with the OpenAI client and Zentry memory setup. - Asking Questions: The
ask_questionmethod sends a question to the AI, incorporates previous memories, and stores new information. - Memory Management: The
get_memoriesand search_memories methods handle retrieval and searching of stored memories.
Usage
- Set your OpenAI API key in the environment variable.
- Instantiate the
PersonalTravelAssistant. - Use the
main()function to interact with the assistant in a loop.