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

LLM POC #31

Merged
merged 24 commits into from
Sep 1, 2024
Merged

LLM POC #31

merged 24 commits into from
Sep 1, 2024

Conversation

leingenm
Copy link
Owner

@leingenm leingenm commented Aug 11, 2024

Pull Request

Description

  • Added the ability to upload a file with videos and save it into the database (Controller LibraryImportController)
  • Added compose.yml to spin up PostgreSQL
  • Added method getVideoData to VideoController and other methods in consequent services to retrieve video data from YouTube API
  • As a part of enhancing the codebase, I added the method getToken to the TokenService to retrieve the token from Spring's authorized client. This should allow us not to pass @RegisteredOAuth2AuthorizedClient OAuth2AuthorizedClient authClient as a parameter to controllers

Related Issue

Issue #30

Checklist

Please review and check all applicable items:

  • I have tested my changes thoroughly
  • My code follows the project's coding standards and guidelines
  • I have added necessary documentation (if applicable)
  • I have updated relevant tests (if applicable)
  • I have reviewed my changes to ensure there are no unnecessary changes
  • My pull request has a descriptive title and includes a detailed description of the changes

Additional Notes

How to guide:

To spin up the DB you'd need to run the command in the terminal:

POSTGRES_PASSWORD=[your-password] POSTGRES_USERNAME=[your-username] docker compose up -d

To make things work in IntelliJ IDEA you'd need to set the environment variables in the run configuration:
Screenshot 2024-08-28 at 09 05 19

Screenshot 2024-08-28 at 09 06 12

Screenshots (if applicable)

@leingenm leingenm linked an issue Aug 11, 2024 that may be closed by this pull request
6 tasks
@daverbk daverbk self-requested a review August 11, 2024 11:55
@daverbk daverbk added the enhancement New feature or request label Aug 11, 2024
@leingenm leingenm marked this pull request as ready for review August 29, 2024 07:00
Copy link
Collaborator

@daverbk daverbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amaaaazing job, really
I've left a few small comments for clairfication purposes mosly)

src/main/java/com/ypm/controller/VideoController.java Outdated Show resolved Hide resolved
volumes:
- ypm-db:/var/lib/postgresql/data

volumes:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just out of curiosity - why do we need a volume here?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the data is persistent even if we stop and start a container with PostgreSQL. But I see a point in not making it persistent

src/main/java/com/ypm/persistence/entity/VideoImport.java Outdated Show resolved Hide resolved
src/main/java/com/ypm/service/youtube/ImportService.java Outdated Show resolved Hide resolved
src/main/java/com/ypm/service/youtube/VideoServiceImp.java Outdated Show resolved Hide resolved
@daverbk daverbk merged commit 8cfca26 into main Sep 1, 2024
3 checks passed
@daverbk
Copy link
Collaborator

daverbk commented Sep 1, 2024

Squashed and merged, thanks!

@daverbk daverbk deleted the issue-30 branch September 1, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[LLM POC] – Set up infractructure
2 participants