This example shows how to use the duohub graph memory integration with AWS Lambda.
This Lambda function integrates with duohub's memory retrieval API to fetch relevant information based on queries. It supports both standard queries and memory-specific retrievals using a memoryID.
- AWS Account with Lambda access
- Node.js 18 or later
- duohub API key
- Clone this repository
- Install dependencies:
npm install # or yarn install
- Set up your environment variables in AWS Lambda:
API_KEY
: Your duohub API key
- Build the TypeScript code:
tsc
- Zip the contents of the
dist
folder along withnode_modules
- Upload to AWS Lambda
The Lambda function accepts events with the following structure:
{
"query": string, // Required: The query to search for
"memoryID": string // Required: Specific memory ID to search within
}