Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

1.3 KB
Raw Blame

Document Text Extractor

This lambda is responsible for extracting text from documents and storing it in a database.

Prerequisites

  • Install and setup Rust ecosystem on your machine.
  • Cargo lambda
  • sqlx-cli installed with cargo install sqlx-cli.
  • just installed with cargo install just

Building for deployment

DO NOT try and build this lambda from this directory for deployment.

# from the repository root
just services/document_text_extractor/build

Local Development

  1. Start local macrodb postgres instance
# from the root of the project
just run_dbs -d
just initialize_dbs # initializes the database if needed
  1. Create and fill in your .env file based on the .env.sample
cp .env.sample .env
  1. Start the lambda locally
#using just
just local


# cargo on linux
cargo lambda watch

# cargo on mac
cargo lambda watch --features macos
  1. Invoke the lambda using the sample input
# using just
just invoke data_file="sample_input.json"

# using cargo
cargo lambda invoke document-text-extractor --data-file sample_input.json

Testing

You must have the macrodb up and running locally to perform testing.

just test or cargo test to run tests