Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 1.22 KB

README.md

File metadata and controls

47 lines (34 loc) · 1.22 KB

duohub logo   lambda logo

duohub x AWS Lambda integration example

This example shows how to use the duohub graph memory integration with AWS Lambda.

Overview

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.

Requirements

Setup

  1. Clone this repository
  2. Install dependencies:
    npm install
    # or
    yarn install
  3. Set up your environment variables in AWS Lambda:
    • API_KEY: Your duohub API key

Deployment

  1. Build the TypeScript code:
    tsc
  2. Zip the contents of the dist folder along with node_modules
  3. Upload to AWS Lambda

Usage

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
}