Skip to content

Designed to enhance document management and interaction, Dynamo AI leverages Spring AI, OpenAI, PostgreSQL, pgvector, and Keycloak to create, tune, and embed models for efficient document handling and query responses.

License

Notifications You must be signed in to change notification settings

Breezeware-OS/dynamo-ai-template

Repository files navigation

Dynamo

A powerful platform designed to supercharge business app development and streamline internal tool creation. Manage, organize, and innovate—all in one place


  • Accelerate development and reduce effort. Leverage industry-specific templates, pre-built modules, and out-of-the-box features.
  • Ensure flexibility and scalability. Build applications with dynamic entities and choose from multiple multi-tenancy models.
  • Utilize familiar technologies: Java, Spring Boot, JavaScript, HTML, ReactJS, SpringAI, BPMN, Hibernate, PostgreSQL.
  • Expand at will. Dynamo provides unlimited customization and seamless integration options.

Languages and Tools:

css3 docker git html5 java spring aws javascript linux mocha postgresql react redux selenium


📌Contents

🚀 How to start
💡 Application screenshots
📜 Release notes
🤝 Support


🚀 Getting started

Overview

This document provides a comprehensive overview of the Dynamo AI application. Designed to enhance document management and interaction, Dynamo AI leverages Spring AI, OpenAI, PostgreSQL, pgvector, and Keycloak to create, tune, and embed models for efficient document handling and query responses. This template facilitates seamless collaboration between users, enabling the creation of models, uploading documents for tuning and embedding, and providing intelligent responses to queries about the documents. Utilizing these technologies ensures robust performance, scalability, and secure authentication.

This guide walks through setting up your Dynamo AI application using Docker Compose. It also covers how to set up authentication using Keycloak.

Release Name Description Release Date
MVP - 1.0.0 The Dynamo AI application is a powerful framework designed to streamline document management and interaction through AI-driven models. By clearly defining roles, tasks, and integration points, it ensures that all stakeholders can effectively create models, upload and tune documents, and query information seamlessly. Leveraging Spring AI and OpenAI provides the necessary flexibility and scalability to adapt to evolving user needs. Integration with PostgreSQL and pgvector ensures efficient data storage and vector-based operations, while Keycloak manages secure authentication and authorization. 08-10-2024

Using Docker Compose

Prerequisites

Before starting, ensure the following are installed and available on your system:

  • Docker or Docker Desktop - (Docker Version - 20.10.x and above)
  • Open ports: 8080, 8081, 3000, 5432, 5433 - Ensure that the following ports are not in use.
  • AWS Services - Make sure you have access to AWS services, specifically S3 for document storage and CloudFront for content delivery.
  • OpenAI API Access - Obtain access to the OpenAI API, which is required to utilize AI models for your application.

1.1 Setup with Docker Compose

  1. Navigate to the project folder in your terminal.
  2. Run the following command to start the Docker containers:
OPENAI_API_KEY=your-api-key \
OPENAI_CHAT_MODEL=chat-model \
AWS_REGION=region \
AWS_ACCESS_KEY_ID=aws-access-key \
AWS_SECRET_ACCESS_KEY=aws-secret-key \
AWS_S3_BUCKET_NAME=aws-bucket-name \
DOCUMENT_CDN_URL=aws-cloud-front-url \
docker-compose up
  • OPENAI_API_KEY: Your OpenAI API key is used to authenticate requests to OpenAI services.

  • OPENAI_CHAT_MODEL: The specific OpenAI chat model you wish to use (e.g., gpt-4, gpt-3.5-turbo-0125 ).

  • AWS_REGION: The AWS region where your services are hosted (e.g., us-east-1).

  • AWS_ACCESS_KEY_ID: Your AWS access key ID for authenticating AWS services.

  • AWS_SECRET_ACCESS_KEY: Your AWS secret access key for authenticating AWS services.

  • AWS_S3_BUCKET_NAME: The name of your AWS S3 bucket where documents will be stored.

  • DOCUMENT_CDN_URL: The URL of your AWS CloudFront distribution serving the documents as a CDN.

    This command will pull and download the necessary containers, and the client will run on localhost:3000.

  1. Default Credentials for Dynamo AI - Username: [email protected] Password: breeze123 or Signup.

  2. Application Port

    • Backend Server - 8081
    • Backend Resource Server - 5433
    • Patient Frontend Client - 3000
    • Careteam Frontend Client - 3001
    • Provider Frontend Client - 3002
    • Auth Server - 8080

1.2 If Docker not installed - Docker Installation

For Docker on Linux:

  1. Update your packages:

    sudo apt-get update
  2. Install Docker using:

    sudo apt install docker.io
  3. Verify installation:

    docker --version

For Docker Desktop on Mac/Windows:

  1. Download and install Docker Desktop from here.
  2. Follow the installation instructions and start Docker Desktop.

1.3 Troubleshooting

Checking and Managing Active Ports

Ensure that the following ports are not in use:

  • 8080
  • 8081
  • 3000
  • 5432
  • 5433

If any of these ports are active, you need to free them by killing the respective processes. You can check for active ports using:

lsof -i :<port_number>

To kill a process on a specific port:

kill -9 <process_id>

If you encounter file permission issues, use the following command:

sudo chown -R $USER:$USER postgres-datas/

If this doesn’t resolve the issue, try:

  • Resetting changes with Git:

    git checkout .
  • Deleting the project and re-cloning it.

If you encounter Error response from daemon: pull access denied for public.ecr.aws, use the following command:

docker logout public.ecr.aws

Additional Notes

  • Always verify that no other processes are using ports 8080, 8081, 3000, 5432, or 5433 before running the services.
  • If you encounter port issues, repeat the process to kill active ports as mentioned above.

This completes the setup for the Dynamo AI Template. If you have any more problems, please feel free to refer to the troubleshooting section or restart from the first steps.

Features

  • Model Creation: Users can create and manage AI models tailored to their specific document management needs.

  • Document Upload: Seamlessly upload documents to the system for tuning and embedding, enhancing the model's understanding and response capabilities.

  • Intelligent Querying: Ask questions about the uploaded documents and receive accurate, context-aware responses powered by AI.

  • Secure Authentication: Robust security managed through Keycloak ensures that only authorized users can access and interact with the application.

  • Model Tuning with Prompts: Fine-tune AI models using custom prompts to better align with specific use cases and improve response accuracy.

  • Configuration Options: Customize model behavior by adjusting parameters such as:

    • Temperature: Controls the randomness of the AI responses. Lower values make the output more deterministic, while higher values increase creativity.
    • Top-K: Limits the number of highest probability tokens to consider for generating the next word, helping to manage response diversity.
    • Top-P: Also known as nucleus sampling, it considers the smallest set of tokens whose cumulative probability exceeds the threshold P, balancing creativity and coherence.
  • Model Testing: Evaluate the performance of AI models through testing interfaces to ensure they meet desired standards before deployment.

  • Model Utilization: Deploy and integrate customized AI models within the application to handle various document management and querying tasks effectively.

Application Screenshots

Screenshot from 2024-10-08 11-07-47

Screenshot from 2024-10-08 11-08-07

Screenshot from 2024-10-08 11-09-12

Screenshot from 2024-10-08 11-09-23

Screenshot from 2024-10-08 11-11-56

Screenshot from 2024-10-08 11-12-09

Screenshot from 2024-10-08 11-12-21

Screenshot from 2024-10-08 11-14-10

Screenshot from 2024-10-08 11-18-13

Screenshot from 2024-10-08 11-19-27

Screenshot from 2024-10-08 11-19-48

Screenshot from 2024-10-08 11-21-02

Screenshot from 2024-10-08 11-21-38

🗃️ Release notes

Dynamo is constantly evolving. Check out the changelog:

Dynamo 1.0.0. 🚀

  • Support for AI templates
  • Fix issues and bugs

Support

For any business inquiries, technical support, or to report issues, please contact [email protected].

Love Dynamo? Give our repo a star ⭐ ⬆️.

About

Designed to enhance document management and interaction, Dynamo AI leverages Spring AI, OpenAI, PostgreSQL, pgvector, and Keycloak to create, tune, and embed models for efficient document handling and query responses.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published