Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add local DynamoDB support and update configuration #1940

Open
wants to merge 1 commit into
base: edge
Choose a base branch
from

Conversation

ballPointPenguin
Copy link
Contributor

Add local DynamoDB support and update configuration

Overview

  • Normalize the newer configuration vars in server and include sane defaults for local development.
  • Enable local dynamodb docker container by default.
  • Narrative Report work is now easy and fun with local docker development (provided with api keys)
  • Everything should "just work" out of the box for normal development without any 3rd-party keys

Change Summary

[Change summary generated by Github Copilot:]

This pull request introduces several new features and improvements, primarily focusing on integrating DynamoDB, adding support for various generative AI models, and improving logging. Below are the most important changes:

DynamoDB Integration:

  • Added a new dynamodb service to docker-compose.yml for local development with DynamoDB.
  • Updated example.env and docs/configuration.md to include configurations for DYNAMODB_ENDPOINT. [1] [2]
  • Enhanced DynamoStorageService to initialize DynamoDB tables if they do not exist. [1] [2]

Generative AI Model Support:

  • Added support for Anthropic, Gemini, and OpenAI API keys in server/src/config.ts and example.env. [1] [2]
  • Updated getTopicsFromRID and getModelResponse functions to handle missing API keys and use the new configuration. [1] [2]

Logging Improvements:

  • Replaced console.error and console.log statements with logger.error and logger.debug for better logging throughout the codebase. [1] [2] [3]

Configuration Updates:

  • Added new environment variables for generative AI models and updated existing ones for AWS configurations in example.env.
  • Updated server/src/config.ts to read from the new environment variables and provide default values where necessary.

Code Refactoring:

  • Refactored imports and added new utility functions in various files to improve code organization and readability. [1] [2]

These changes collectively enhance the application's functionality, especially in terms of database management, AI model integration, and logging practices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant